LPC1756 RTC One time initialization

cancel
Showing results for 
Search instead for 
Did you mean: 

LPC1756 RTC One time initialization

217 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sathyan on Mon Jul 21 08:28:49 MST 2014
Dear All,

I just started working on the inbuilt RTC block of LPC1756.

I have an external battery connected to Vbat.

I have programmed the RTC time values in flash and its working fine. Now the values will be retained even after micro controller power off . But, when i switch on the micro controller, the RTC will be initialized again with the default time values!

How to overcome this situation and retain the first loaded time values even after consecutive micro controller power off/on?

-Sathyan
      
Labels (1)
0 Kudos
1 Reply

180 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nxp_apps on Sat Jul 26 14:39:16 MST 2014
Hi,

If Vbat is maintained (powered) after you remove rest of the power supply on the micro, the RTC initialization can be avoided by checking bit '1' in the CCR register (Clock Control Register) using software.

Something like:

/*only initialize the RTC registers if they were not initialized yet*/
  if(!((CCR == 0x01)))
  {
RTCInit();
}

Hope this helps.
Thanks.

nxp_support
0 Kudos