This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Watchdog storing data before reset

I want to store some data to flash before watchdog reset, Is this possible. Also what is the use of eight separate reload request registers.

Thanks

Parents
  • If you check the watchdog documentation you'll see you have two LFCLK cycles between the interrupt and the actual reset, so you have let's call it 50us, you can work out how many CPU cycles that is as you don't say which chip you're using. That's enough time to store some amount of data to flash. 

    And there are many reload registers because it's quite possible for a piece of code to have various independent subsystems each of which has to be running in order for the app to be 'live'. Say you have two operations running on two timers, if you had only one register which both operations wrote to and the second operation stopped, you'd never know because the first one would keep feeding the watchdog. If however each subsystem writes to its own enabled register in the watchdog, if any of them fail, you'll reset. Just enable the number of registers you need. 

Reply Children
No Data
Related