This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Register that survives a wd reset?

I am looking for a way to determine whether a F28335 has been reset by the WD versus a normal power up.  Is there any bit in a register that can be examined to determine this?  

  • Hi Jerry,

    WDCR bit WDFLAG

    Regards, Mitja

  • Thanks. Are there any other bits that I can set before the reset the will be preserved.  I'd like to optionally set a bit to keep the code in an update mode if a bit has been set and the wd has been reset.  Is it safe to assume RAM will retain it's value through a wd reset?

     

  • RAM will retain it's value through a WD reset, but you have two issues:

    1. after a reset the code will go through complete initialization, thus all initialized C global variables will be initialized. You might get around this with some assembly code and variable declared and initialized (conditionally) in assembly.

    2. RAM might retain the value through power-down power-up. It might even be initialized to to some meaningfull value at power-up.

    If you are working with 28335 and using XINTF you'd be smart to issue WD reset at CPU initialization as a workaround for the silicon bug. This might complicate your code a little more.

    Regards, Mitja