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.

MSP4305659, Backup battery, RTC registers not retained, LOCKBAK



Dear MSP430 support

SLAU208M User's Guide, page 125: "RTC registers are not retained during backup operation".  Please list specifically which RTC registers are not retained.  Obviously RTC doesn't loose time in backup so clock registers like RTCMIN are retained.  Which registers are NOT retained?

Same location: "RTC registers ... and they must be restored.  Then the LOCKBAK bit can be cleared..."  Can LOCKBAK bit be cleared first and then the RTC registers restored?

LOCKBAK - if LOCKBAK cleared by software which, if any, RTC registers can NOT be written?

LOCKBAK - Please give a better explanation of operation.  What does page 129 "0b = Backup subsystem not locked" mean?  What does page 129 "1b = Backup subsystem locked " mean?

I have read the WIKI but have not found answers to above questions.

Thanks!

  • Michael,

    if you look in the same document SLAU208M, Table 23-1. "RTC_B Registers" at page 601, you can find the list of RTC registers and a column for "LPMx.5 Operation" which is "retained" or "not retained".

  • Hi Leo,

    Great 100% answer!  Now I see the right column.  Sorry I missed it.  Thanks!

    How about the LOCKBAK part of the question?  Is there a table that shows which registers can NOT be written once software clears LOCKBAK?   What purpose does LOCKBAK serve?

  • Michael Head said:
    What purpose does LOCKBAK serve

    In LPM3.5, energy consumption has to be reduced to the minimum possible.This includes disabling retention of the RTC config registers. To avoid that the change of the config registers affects the RTC operation, the connection between the two is severed by the LOCKBAK bit.
    So at startup after LPM3.5, the boot code will initialize the RTC - without immediate effect. Then your application code can initialize the RTC register one by one - without immediate effect. Then you clear the LOCKBAK bit and all changes (or re-configurations to the intended RTC working mode, likely identical to the ones before entering LPM3.5) take effect. If done right, RTC operation continues seamlessly, even though the registers lost their content during power-down and were rewritten on restart.

  • "severed"  Ah-ha!  Thank you thank you!  I see the light.  If the RTC control registers die and they are still connected to the active clock I can see that bad things can happen. 

    I guess that once the system returns to active mode and I re-configure the RTC control registers and clear LOCKBAK (and thus the RTC now implements my RTC control settings) I am still free at some later time in active mode to make changes to RTC control registers (such as changing the alarm for example) and have those changes  immediately implemented by RTC??


    'severed' is a really good word and I wish the authors of SLAU208M had used it.  Would have saved a lot of time.

  • You’re right.
    If the not-retained registers are re-configured by software to the values they had before, then the RTC won’t be affected when LOCKBAK is cleared. After that, you can control the RTC normally.
    Likely, you will be unable to restore the alarm registers (you can’t read the RTC to re-configure the alarm before you clear LOCKBAK) but normally, this is no problem – the alarm time has likely already passed (for sure, if the alarm was the interrupt that has restarted the MSP), and you can configure the alarm as disabled initially, then clear LOCKBAK and then set a new alarm if required.

**Attention** This is a public forum