Hi
I am LPC4367 and I am testing internal RTC with my customize development board of my project. I am facing issue with RTC init . Follwing is the initialization sequence
Chip_Clock_RTCEnable();
/* 2-Second delay after enabling RTC clock */
LPC_ATIMER->DOWNCOUNTER = 2048;
while (LPC_ATIMER->DOWNCOUNTER);
/* 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;
But when i runt the code in debug mode using LPClink2 ,
The program was unable to run through the do-while loop after the LPC_RTC->CCR |= RTC_CCR_CTCRST statement inside "Chip_RTC_ResetClockTickCounter(pRTC);". Then it crashed eventually. What is the problem? Please help!
But the same code when I run with the evaluation board OM13088 then it work fine. I have attached the project for your reference.
I also refered https://community.nxp.com/thread/438393 but there also no such solution found.
Thanks,
Gaurav More