summaryrefslogtreecommitdiff
path: root/ports/mimxrt/main.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2021-05-16 13:27:54 +1000
committerDamien George <damien@micropython.org>2021-05-18 22:36:32 +1000
commit7408ca1d7857df5ea348da35c9ee12f70a024478 (patch)
treefe23eaca7aa2d71a5ff3a7fa24c93df94b3721cb /ports/mimxrt/main.c
parent452fa3f8d4cd8880da06b8a41e191e2acac59c3f (diff)
mimxrt: Improve ticks and sleep functions using GPT.
SysTick cannot wake the CPU from WFI/WFE so a hardware timer is needed to keep track of ticks/delay (similar to the nrf port). Fixes issue #7234. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'ports/mimxrt/main.c')
-rw-r--r--ports/mimxrt/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/mimxrt/main.c b/ports/mimxrt/main.c
index e06283a8a..7832afffc 100644
--- a/ports/mimxrt/main.c
+++ b/ports/mimxrt/main.c
@@ -32,6 +32,7 @@
#include "py/stackctrl.h"
#include "lib/utils/gchelper.h"
#include "lib/utils/pyexec.h"
+#include "ticks.h"
#include "tusb.h"
#include "led.h"
@@ -41,6 +42,7 @@ void board_init(void);
int main(void) {
board_init();
+ ticks_init();
tusb_init();
led_init();