Skip to content

Commit bbe3051

Browse files
committed
Fix other INTENCLR and INTENSET to write whole reg
1 parent c06eee9 commit bbe3051

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,13 @@ static void frequencyin_reference_tc_init(void) {
185185

186186
#ifdef SAMD21
187187
tc->COUNT16.CTRLA.reg = TC_CTRLA_MODE_COUNT16 | TC_CTRLA_PRESCALER_DIV1;
188-
tc->COUNT16.INTENSET.bit.OVF = 1;
188+
tc->COUNT16.INTENSET.reg = TC_INTENSET_OVF;
189189
NVIC_EnableIRQ(TC3_IRQn + reference_tc);
190190
#endif
191191
#ifdef SAM_D5X_E5X
192192
tc->COUNT16.CTRLA.reg = TC_CTRLA_MODE_COUNT16 |
193193
TC_CTRLA_PRESCALER_DIV1;
194-
tc->COUNT16.INTENSET.bit.OVF = 1;
194+
tc->COUNT16.INTENSET.reg = TC_INTENSET_OVF;
195195
NVIC_EnableIRQ(TC0_IRQn + reference_tc);
196196
#endif
197197
}

ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ STATIC void setup_wdt(watchdog_watchdogtimer_obj_t *self, int setting) {
5858
while (WDT->SYNCBUSY.reg) { // Sync CTRL write
5959
}
6060

61-
WDT->INTENCLR.bit.EW = 1; // Disable early warning interrupt
61+
WDT->INTENCLR.reg = WDT_INTENCLR_EW; // Disable early warning interrupt
6262
WDT->CONFIG.bit.PER = setting; // Set period for chip reset
6363
WDT->CTRLA.bit.WEN = 0; // Disable window mode
6464
while (WDT->SYNCBUSY.reg) { // Sync CTRL write

0 commit comments

Comments
 (0)