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>
This commit is contained in:
@@ -53,9 +53,6 @@ void board_init(void) {
|
||||
// Enable IOCON clock
|
||||
CLOCK_EnableClock(kCLOCK_Iomuxc);
|
||||
|
||||
// 1ms tick timer
|
||||
SysTick_Config(SystemCoreClock / 1000);
|
||||
|
||||
// ------------- USB0 ------------- //
|
||||
|
||||
// Clock
|
||||
@@ -85,10 +82,6 @@ void board_init(void) {
|
||||
// CLOCK_EnableUsbhs1Clock(kCLOCK_Usb480M, 480000000U);
|
||||
}
|
||||
|
||||
void SysTick_Handler(void) {
|
||||
systick_ms++;
|
||||
}
|
||||
|
||||
void USB_OTG1_IRQHandler(void) {
|
||||
tud_int_handler(0);
|
||||
tud_task();
|
||||
|
||||
Reference in New Issue
Block a user