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)