diff --git a/ion/src/device/n0101/drivers/config/timing.h b/ion/src/device/n0101/drivers/config/timing.h index 747611b5c..fcd1b4ff2 100644 --- a/ion/src/device/n0101/drivers/config/timing.h +++ b/ion/src/device/n0101/drivers/config/timing.h @@ -8,12 +8,12 @@ namespace Device { namespace Timing { namespace Config { -// TODO: calibrate msleep -constexpr static int LoopsPerMillisecond = 8852; -constexpr static int LoopsPerMicrosecond = 9; +constexpr static int LoopsPerMillisecond = 4426; +constexpr static int LoopsPerMicrosecond = 36; // CPU clock is 96 MHz, and systick clock source is divided by 8 // To get 1 ms systick overflow we need to reset it to // 96 000 000 (Hz) / 8 / 1 000 (ms/s) - 1 (because the counter resets *after* counting to 0) +// TODO: calibrate systick constexpr static int SysTickPerMillisecond = 12000;