You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the datasheet the watchdog timer is enabled by default after a power-on reset. It's set to ~ 16 seconds after which it will reset the board (section 15.4 on page 261). If you're just blinking an LED like in this example especially with a long period then you are unlikely to notice it fire and reset the board. I spent an hour debugging my own bare metal program trying to figure out why it was resetting at such a consistent uptime before I figured this out. You can disable it on boot with:
staticuint32_t*constWDT_MR= (uint32_t*) 0x400E1A54;
voidmain() {
// watchdog timer is actived on boot with a default timeout so disable it// note: you can only write to WDT_MR once after power on reset// Atmel SAM3X8E Datasheet, section 15.4, page 261*WDT_MR |= (1 << 15); // WDDIS (watchdog disable) bit, page 265// ... omitted ...
}
Hopefully this helps the next person who comes along and tries to use this project as a starting point from having to debug the same issue.
The text was updated successfully, but these errors were encountered:
According to the datasheet the watchdog timer is enabled by default after a power-on reset. It's set to ~ 16 seconds after which it will reset the board (section 15.4 on page 261). If you're just blinking an LED like in this example especially with a long period then you are unlikely to notice it fire and reset the board. I spent an hour debugging my own bare metal program trying to figure out why it was resetting at such a consistent uptime before I figured this out. You can disable it on boot with:
Hopefully this helps the next person who comes along and tries to use this project as a starting point from having to debug the same issue.
The text was updated successfully, but these errors were encountered: