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

Can WDT reset be postponed?

I am working with the nRF52832, SDK14.0.0. I want to perform a flash write on a watchdog reset to save the current state. However, the watchdog resets after two cycles of the 32 MHz clock, which is not enough time to finish the data processing I want and the flash write. Is there a way to extend the timing of this reset, or is it somehow set in hardware? 

Parents
  • Two things

    1)  Giving any ability to postpone reset (more than what is allowed) after WDT timeout will fail the purpose of the watchdog. 

    2) It is not two cycles of 32MHz but two clock cycles of 32KHz

    Watchdog reset

    A TIMEOUT event will automatically lead to a watchdog reset.

    See Reset for more information about reset sources. If the watchdog is configured to generate an interrupt on the TIMEOUT event, the watchdog reset will be postponed with two 32.768 kHz clock cycles after the TIMEOUT event has been generated. Once the TIMEOUT event has been generated, the impending watchdog reset will always be effectuated.

    That should give you enough time to write one word to flash as it takes about 40uS to do so.

    tWRITE

    Time to write one 32-bit word

    411 µs
Reply
  • Two things

    1)  Giving any ability to postpone reset (more than what is allowed) after WDT timeout will fail the purpose of the watchdog. 

    2) It is not two cycles of 32MHz but two clock cycles of 32KHz

    Watchdog reset

    A TIMEOUT event will automatically lead to a watchdog reset.

    See Reset for more information about reset sources. If the watchdog is configured to generate an interrupt on the TIMEOUT event, the watchdog reset will be postponed with two 32.768 kHz clock cycles after the TIMEOUT event has been generated. Once the TIMEOUT event has been generated, the impending watchdog reset will always be effectuated.

    That should give you enough time to write one word to flash as it takes about 40uS to do so.

    tWRITE

    Time to write one 32-bit word

    411 µs
Children
Related