ntasher
Joined: 22/07/2014 11:05:59
Messages: 3
Offline
|
This one occurred to me when looking for ways to use the internal watchdog. Since I had issues with bootloader programming (since resolved) I wanted something else that would allow me to have some means of resetting a naughty processor. I had a great idea - use the RTC alarm output pin for that purpose. The RTC can be set to trigger an alarm at a specific time (minute or second or hour or combination of them). So I basically read the current seconds reading, set ALARM0 to N seconds away, set the output pin to go low on alarm tigger, and connect the alarm pin (also going to D3) to the RST pin via a 1uF capacitor. If I don't update the RTC alarm time every so often, the alarm will go off, pulling the RST low via the capacitor, resetting the CPU.
Note that the 1uF capacitor needs to be removed when connecting the board to the PC for code download.
|