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.

Real-time clock cleared on reset

Other Parts Discussed in Thread: MSP430F5438

Is it the intended behaviour for the RTC calendar registers to be cleared after a reset?  The device has been powered the entire time.  Is it possible to configure the RTC to preserve its values on all but power off/on resets?  I'm working with the MSP430F5438. 

  • Hi Scott,

    If you look at the 5xx/6xx family user guide (slau208j), the initial state of the RTC calendar registers are undefined, so there's no guarantee whatsoever that they will be retained, cleared, or simply filled with random bits.

    You could backup the calendar to the flash INFO section periodically, in interval or as triggered by the RTC interrupts (daily, hourly, etc). The contents of the registers can then be restored on reset, even for POR.

    Tony

  • Scott Manton said:
     Is it possible to configure the RTC to preserve its values on all but power off/on resets?

    Yes. Create your own software reset routine triggered by IO pin.

    Peter

  • No, you can't configure the RTC for the behavior you want.

    However, a PUC won't affect those registers.  I think even a POR won't affect them either.  It's the BOR that makes them go "random".  What is the nature of the reset that is causing these registers to clear out?  FYI a low pulse on the reset pin causes a BOR.

    You can manually cause a PUC in lots of different ways.  Try it; you should see that the calendar registers don't change.

    Also are you aware of the RTC bug in the '5438?  Hopefully that's not burning you.

    Jeff

  • Yes, I have the 5438 RTC work around in place, thanks.  My reset command must be triggering a BOR.  I'll try to have the reset command do a PUC and see if that works.  Thanks for all the great comments, will check it out on Monday. 

**Attention** This is a public forum