Pages: [1]   Go Down
Author Topic: Determining the Cause of MCU restart - Atmega168  (Read 417 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


I have found a trouble in determining the cause of Atmega168 restart.
According to the documentation, the 3rd bit of the MCUSR register should be 1 if MCU restarted due WDT (00001000b).
But seems that this bit is never 1.
Checked other bits - PowerUp bit (00000001b) is working correctly.

Wasnt able to find anything about this in errata...

Hope someone have solved this somehow and can help with the issue.


SF Bay Area (USA)
Offline Offline
Tesla Member
Karma: 135
Posts: 6788
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The Arduino bootloader intercepts all resets, and will likely interfere with the user sketch determining the reason for reset.  (this is certainly true of Optiboot: )  Whether it's true of 168-based arduinos (which run one of several other bootloaders) is uncertain...)

Pages: [1]   Go Up
Jump to: