File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ void SysTick_Handler(void) {
220220 systick_ticks_ms += 1 ;
221221 // Keep the counter within the range of 31 bit uint values since that's the
222222 // max value for micropython 'small' ints.
223- systick_ticks_ms = systick_ticks_ms > 2147483647L ? 0 : systick_ticks_ms ;
223+ systick_ticks_ms = systick_ticks_ms > ( 0xFFFFFFFF >> 1 ) ? 0 : systick_ticks_ms ;
224224}
225225
226226// Interrupt flags that will be saved and restored during disable/Enable
@@ -237,8 +237,8 @@ void mp_hal_disable_all_interrupts(void) {
237237
238238void mp_hal_enable_all_interrupts (void ) {
239239 // Enable all interrupt sources after timing critical sections.
240- // Restore ASF-based interrupts.
241- cpu_irq_restore (irq_flags );
242240 // Restore SysTick interrupt.
243241 SysTick -> CTRL |= SysTick_CTRL_TICKINT_Msk ;
242+ // Restore ASF-based interrupts.
243+ cpu_irq_restore (irq_flags );
244244}
You can’t perform that action at this time.
0 commit comments