Hello Krishna,
I modified the example of the RTC provided in the LPCOpen 2_10 for the LPC1769 to toggle a led each minute with the RTC minutes interrupt and everything worked fine. Here is the main of my project.
void RTC_IRQHandler(void)
{
if (Chip_RTC_GetIntPending(LPC_RTC, RTC_INT_COUNTER_INCREASE)) {
Chip_RTC_ClearIntPending(LPC_RTC, RTC_INT_COUNTER_INCREASE);
Board_LED_Toggle(0);
}
}
int main(void)
{
SystemCoreClockUpdate();
Board_Init();
Board_LED_Set(2, false);
Chip_RTC_Init(LPC_RTC);
Chip_RTC_CntIncrIntConfig(LPC_RTC, RTC_AMR_CIIR_IMMIN, ENABLE);
Chip_RTC_ClearIntPending(LPC_RTC, RTC_INT_COUNTER_INCREASE);
NVIC_EnableIRQ((IRQn_Type) RTC_IRQn);
Chip_RTC_Enable(LPC_RTC, ENABLE);
while (1)
{
__WFI();
}
}
Hope it helps!
Victor.
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------