Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 6 months ago.
Is it possible stop the RTC time registers being reset if BU power is supplied or on a nRST
I have had a good look at the RTC code, but can't see were the RTC CTRL register is reset on a power cycle. Does this require the BURTC for this work?
Question relating to:
1 Answer
8 years, 6 months ago.
You are correct, it is only the BURTC (and its 512 bytes of retention RAM) that don't lose state when in Backup Power mode. Additionally, you will need to configure the MCU to go to BU power on loss of regular VDD, since that is switched off by default. Please see chapter 10.3.4 (Backup Power Domain) in the EFM32 Giant Gecko reference manual for more info on how to do that.
I have the Simplicity Studio STK3800_burtc example almost working apart from the burtc does not advance on power down. It retains the time when powered off, but has not advanced during the off period. I have monitored the BURTC_RetRegGet(1) and does not count. I'm using the code in the example for burtcSetup not the mbed em_burtc.c code.
Any suggestions. Looks like the BU power domain is functioning and the resetcause = RMU->RSTCAUSE appears to be working, RTC's is reset on nRST but not when powering off with the slide switch as expected.
posted by 11 May 2016Hmm... Can you verify that the same oscillator you selected for the BURTC is also enabled through the EM4CONF register in the EMU?
posted by 13 May 2016Fixed, took me time to see what was going on in the Simplicity Studio example.
Working example here, but not fully tested.
https://developer.mbed.org/users/star297/code/EFM32_BUrtc-Demo/
posted by 16 May 2016