my Real Time Clock (RTC) on the S6E2DH5J0A works well.
Now I want to set up a 1-second-interrupt.
After clearing all interrupt flags, enabeling the 1-second-interrupt and enabeling (and clearing) the NIVC, the RTC_IRQHandler (void) will be executed immediately.
Moreover it is not possible to return from the RTC_IRQHandler, although I have cleared every interrupt flag and the NIVC.
Did someone have the same problem? Can someone post some code example for setting up the 1 second interrupt of the RTC?
PS: I use FreeRTOS on my MCU.
Sample code for Peripheral control including RTC is included in the Peripheral Driver Library (PDL).
For S6E2DH5J0A (FM4) please install PDL version 2.1.x and refer to the following file.
Following functions of rtc.c will be helpful.
void Rtc_IrqHandler (volatile stc_rtcn_t * pstcRtc, stc_rtc_intern_data_t * pstcRtcInternData)
en_result_t Rtc_ClrIrqFlag (volatile stc_rtcn_t * pstcRtc, en_rtc_irq_sel_t enIrqSel)