Skip to content

Commit

Permalink
Merge branch 'fix-wdie-autoclearing' of https://github.com/WGH-/simavr:
Browse files Browse the repository at this point in the history
Fix WDIE being wrongly cleared in Interrupt Mode buserror#470.
  • Loading branch information
ga committed Jan 8, 2022
2 parents 4887ed7 + d6ba83c commit 4d7fbd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simavr/sim/avr_watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ static void avr_watchdog_irq_notify(
* again when cleared (after servicing), value = 0
*/

if (!value && avr_regbit_get(avr, p->watchdog.raised)) {
if (!value && avr_regbit_get(avr, p->watchdog.raised) && avr_regbit_get(avr, p->wde)) {
avr_regbit_clear(avr, p->watchdog.enable);
}
}
Expand Down

0 comments on commit 4d7fbd3

Please sign in to comment.