lpc4088 RTC stucked

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,530件の閲覧回数
alesandro_piazza
Contributor I

Does anyone know the meaning of bit 0x00000020 fo CCR register? sometimes CCR goes to 0x31 (instead of 0x11) and RTC gets stucked... ther is no way to reset it (battery disconnection, power supply reset, uc reprogramming). Thanks!

0 件の賞賛
返信
1 解決策
1,479件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

What about the detail appearance of stuck?

 

 

 

元の投稿で解決策を見る

0 件の賞賛
返信
7 返答(返信)
1,508件の閲覧回数
alesandro_piazza
Contributor I

Hi, I'm using this sequence:

Chip_RTC_Init(LPC_RTC);
//
FullTime.time[RTC_TIMETYPE_SECOND] = 0;
FullTime.time[RTC_TIMETYPE_MINUTE] = 0;
FullTime.time[RTC_TIMETYPE_HOUR] = 0;
FullTime.time[RTC_TIMETYPE_DAYOFMONTH] = 20;
FullTime.time[RTC_TIMETYPE_DAYOFWEEK] = 3;
FullTime.time[RTC_TIMETYPE_DAYOFYEAR] = 20;
FullTime.time[RTC_TIMETYPE_MONTH] = 01;
FullTime.time[RTC_TIMETYPE_YEAR] = 2021;
Chip_RTC_SetFullTime(LPC_RTC, &FullTime);

/* Enable rtc (starts increase the tick counter and second counter register) */
Chip_RTC_Enable(LPC_RTC, ENABLE);

 

void Chip_RTC_Init(LPC_RTC_T *pRTC)
{
Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_RTC);

/* Disable RTC */
Chip_RTC_Enable(pRTC, DISABLE);

/* Disable Calibration */
Chip_RTC_CalibCounterCmd(pRTC, DISABLE);

/* Reset RTC Clock */
Chip_RTC_ResetClockTickCounter(pRTC);

/* Clear counter increment and alarm interrupt */
pRTC->ILR = RTC_IRL_RTCCIF | RTC_IRL_RTCALF;
while (pRTC->ILR != 0) {}

/* Clear all register to be default */
pRTC->CIIR = 0x00;
pRTC->AMR = 0xFF;
pRTC->CALIBRATION = 0x00;
}

 

I have ten boards working properly, this same card worked fine before it was reprogrammed. Even if I uploaded old FW (using built in UART bootloader) there is no way to make RTC to count again.

0 件の賞賛
返信
1,521件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

The bit 5 of CCR is no meaning, ignore it .

And pay attention all NC bits in this register CCR should be initialized when the RTC is first turned on.

Also there is RTC demo under LPCopen, recommend you have a look, download from:

https://www.nxp.com/design/microcontrollers-developer-resources/lpcopen-libraries-and-examples/lpcop...

 

 

 

Regards,

Alice

 

0 件の賞賛
返信
1,508件の閲覧回数
alesandro_piazza
Contributor I

I cannot find any support for LPC4088 under SDK

0 件の賞賛
返信
1,495件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

Sorry, under LPCopen, there is RTC demo for LPC4088:

https://www.nxp.com/design/microcontrollers-developer-resources/lpcopen-libraries-and-examples/lpcop... 

Alice_Yang_0-1611297037328.png

 

Regards,

Alice

 

0 件の賞賛
返信
1,490件の閲覧回数
alesandro_piazza
Contributor I

Hello!

I've just tried the demo code... same behaviour, rtc stucked.

 

0 件の賞賛
返信
1,480件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

What about the detail appearance of stuck?

 

 

 

0 件の賞賛
返信
1,462件の閲覧回数
alesandro_piazza
Contributor I

Hi, just solved thanks.

bad rtc crystal, I think something goes wrong when we fix them to the board (we fold the crystal).

 

 

0 件の賞賛
返信