fix for micros() when not running at default 72MHz. Was affecting intrc-only operation at 64MHz. Updated uvproj to latest keil mdk

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@329 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
timecop@gmail.com 2013-05-29 00:05:33 +00:00
parent 2e64a5d4e1
commit 01572cbb96
2 changed files with 4 additions and 1 deletions

View File

@ -165,6 +165,7 @@
<Capability>1</Capability>
<DriverSelection>4096</DriverSelection>
</Flash1>
<bUseTDR>0</bUseTDR>
<Flash2>BIN\UL2CM3.DLL</Flash2>
<Flash3>"" ()</Flash3>
<Flash4></Flash4>
@ -970,6 +971,7 @@
<Capability>1</Capability>
<DriverSelection>4096</DriverSelection>
</Flash1>
<bUseTDR>0</bUseTDR>
<Flash2>BIN\UL2CM3.DLL</Flash2>
<Flash3>"" ()</Flash3>
<Flash4></Flash4>
@ -1719,6 +1721,7 @@
<Capability>1</Capability>
<DriverSelection>4096</DriverSelection>
</Flash1>
<bUseTDR>0</bUseTDR>
<Flash2>BIN\UL2CM3.DLL</Flash2>
<Flash3>"" ()</Flash3>
<Flash4></Flash4>

View File

@ -33,7 +33,7 @@ uint32_t micros(void)
ms = sysTickUptime;
cycle_cnt = SysTick->VAL;
} while (ms != sysTickUptime);
return (ms * 1000) + (72000 - cycle_cnt) / 72;
return (ms * 1000) + (usTicks * 1000 - cycle_cnt) / usTicks;
}
// Return system uptime in milliseconds (rollover in 49 days)