We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ef34378 + b74893e commit a4bd772Copy full SHA for a4bd772
ports/atmel-samd/supervisor/port.c
@@ -644,13 +644,18 @@ void port_disable_tick(void) {
644
RTC->MODE0.INTENCLR.reg = RTC_MODE0_INTENCLR_PER2;
645
#endif
646
#ifdef SAMD21
647
+ if (_tick_event_channel == EVSYS_SYNCH_NUM) {
648
+ return;
649
+ }
650
+
651
if (_tick_event_channel >= 8) {
652
uint8_t value = 1 << (_tick_event_channel - 8);
653
EVSYS->INTENCLR.reg = EVSYS_INTENSET_EVDp8(value);
654
} else {
655
uint8_t value = 1 << _tick_event_channel;
656
EVSYS->INTENCLR.reg = EVSYS_INTENSET_EVD(value);
657
}
658
+ disable_event_channel(_tick_event_channel);
659
_tick_event_channel = EVSYS_SYNCH_NUM;
660
661
0 commit comments