diff --git a/lib/tinyusb b/lib/tinyusb index 218b80e63a..cfcffe94ce 160000 --- a/lib/tinyusb +++ b/lib/tinyusb @@ -1 +1 @@ -Subproject commit 218b80e63ab6ff87c1851e403f08b3d716d68f5e +Subproject commit cfcffe94ce62f5ef1fb5aef4641924d64dc4b1c0 diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c index b9977fdc46..02b9e38743 100644 --- a/ports/atmel-samd/supervisor/port.c +++ b/ports/atmel-samd/supervisor/port.c @@ -429,7 +429,9 @@ uint32_t port_get_saved_word(void) { // TODO: Move this to an RTC backup register so we can preserve it when only the BACKUP power domain // is enabled. static volatile uint64_t overflowed_ticks = 0; +#ifdef SAMD21 static volatile bool _ticks_enabled = false; +#endif static uint32_t _get_count(uint64_t* overflow_count) { #ifdef SAM_D5X_E5X @@ -537,9 +539,11 @@ void port_disable_tick(void) { // they'll wake us up earlier. If we don't, we'll mess up ticks by overwriting // the next RTC wake up time. void port_interrupt_after_ticks(uint32_t ticks) { + #ifdef SAMD21 if (_ticks_enabled) { return; } + #endif _port_interrupt_after_ticks(ticks); }