1 Reply Latest reply on Aug 6, 2018 11:05 PM by GeonaP_26

    Can't return from RTC_IRQHandler

    towec_2281206

      Hello everybody,

       

      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.

        • 1. Re: Can't return from RTC_IRQHandler
          GeonaP_26

          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.

          (Install Directory)\2.1.0\drivers\rtc\rtc.[c|h]

           

           

          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)