Skip to content

Commit 0c2a8ce

Browse files
committed
MCU8MASS-1764 Fix not clearing interrupt flag before reset
1 parent f97f9be commit 0c2a8ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/sandbox/sandbox.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,15 @@ ISR(TCA0_OVF_vect) {
8181

8282
void sendHeartbeatInterrupt(void) {
8383
if (PORTD.INTFLAGS & PIN2_bm) {
84-
event_flags |= SEND_HEARTBEAT_FLAG;
8584
PORTD.INTFLAGS = PIN2_bm;
85+
event_flags |= SEND_HEARTBEAT_FLAG;
8686
}
8787
}
8888

8989
void resetInterrupt(void) {
9090
if (PORTF.INTFLAGS & PIN6_bm) {
91-
asm("jmp 0");
9291
PORTF.INTFLAGS = PIN6_bm;
92+
asm("jmp 0");
9393
}
9494
}
9595

0 commit comments

Comments
 (0)