mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-01 21:07:40 +08:00
[fix] Correct cpu_ticks_per_sec for chibios
This commit is contained in:
@@ -49,7 +49,7 @@ static void sys_tick_handler(void);
|
|||||||
void sys_time_arch_init(void)
|
void sys_time_arch_init(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
sys_time.cpu_ticks_per_sec = STM32_SYSCLK;
|
sys_time.cpu_ticks_per_sec = CH_CFG_ST_FREQUENCY;
|
||||||
|
|
||||||
/* cpu ticks per desired sys_time timer step */
|
/* cpu ticks per desired sys_time timer step */
|
||||||
sys_time.resolution_cpu_ticks = (uint32_t)(sys_time.resolution * sys_time.cpu_ticks_per_sec + 0.5);
|
sys_time.resolution_cpu_ticks = (uint32_t)(sys_time.resolution * sys_time.cpu_ticks_per_sec + 0.5);
|
||||||
|
|||||||
Reference in New Issue
Block a user