]> www.fi.muni.cz Git - bike-lights.git/commitdiff
Disable WDT as early as possible
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Fri, 7 Jun 2013 15:42:10 +0000 (17:42 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Fri, 7 Jun 2013 15:46:22 +0000 (17:46 +0200)
Apparently, after WDT reset, WDT is still running, and has to be
disabled. Otherwise it will kick in again during the initialization.

We want to indicate the WDT reset contition somehow. We use the GPIO
LED 0 - we set it to on if the reset source was WDT.

Also, we want to read and reset MCUSR as early as possible. We do it
from main(), and we then send the saved value where needed (init_log()
and power_down()).


No differences found