LPC1756 RTC One time initialization

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC1756 RTC One time initialization

391件の閲覧回数
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
      
ラベル(1)
0 件の賞賛
1 返信

354件の閲覧回数
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 件の賞賛