RTC initialization issue in LPC1768

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

RTC initialization issue in LPC1768

348件の閲覧回数
Suchismita
Contributor I

Hi ,

 

For RTC initialization in LPC1768 I am using below code, after time is set initially , it is working fine, but after power reset it is giving garbage value, that to everytime same garbage value . Tried modifying the init block code in many ways , still error persists, any suggestion, how to resolve the issue?

void RTC_Init(void)
{
LPC_SC->PCONP |=(1<<9); // Enable the power to RTC module
/* Disable RTC clock, reset clock, Enable RTC calibration */
LPC_RTC->CCR = ((1<<SBIT_CTCRST) | (1<<SBIT_CCALEN));
LPC_RTC->CALIBRATION = 0x00;
LPC_RTC->CCR = (1<<SBIT_CLKEN); /* Enable the clock for RTC */
}

0 件の賞賛
返信
1 返信

314件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @Suchismita 

Please refer to the RTC demo under LPCopen, which contains detailed examples and configurations that can guide you through the implementation process.

Alice_Yang_1-1747045722610.png

The initialization code is as follows:

Alice_Yang_0-1747045631829.png

 

BR

Alice

 

 

0 件の賞賛
返信