We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentf77113c commit2ee52c4Copy full SHA for 2ee52c4
atmel-samd/mphalport.c
@@ -220,7 +220,7 @@ void SysTick_Handler(void) {
220
systick_ticks_ms+=1;
221
// Keep the counter within the range of 31 bit uint values since that's the
222
// max value for micropython 'small' ints.
223
-systick_ticks_ms=systick_ticks_ms>2147483647L ?0 :systick_ticks_ms;
+systick_ticks_ms=systick_ticks_ms>(0xFFFFFFFF >>1) ?0 :systick_ticks_ms;
224
}
225
226
// Interrupt flags that will be saved and restored during disable/Enable
@@ -237,8 +237,8 @@ void mp_hal_disable_all_interrupts(void) {
237
238
voidmp_hal_enable_all_interrupts(void) {
239
// Enable all interrupt sources after timing critical sections.
240
-// Restore ASF-based interrupts.
241
-cpu_irq_restore(irq_flags);
242
// Restore SysTick interrupt.
243
SysTick->CTRL |=SysTick_CTRL_TICKINT_Msk;
+// Restore ASF-based interrupts.
+cpu_irq_restore(irq_flags);
244