1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 20:35:33 +03:00

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

@ -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)