3 Replies Latest reply on Nov 22, 2016 12:43 AM by maskrtnik01_1570836

    PPS from RTC component

    maskrtnik01_1570836

      Hello,

         

      I am working on a GPS clock using CY8CKIT-059. I have decided to use RTC block because of its DST support. I see in auto-generated code that it has a precious pulse-per-second ISR for internal purposes. Is there any way to get this PPS signal, to execute some code every second? 

         

      One easy solution would be to place clock display update to main function - to uninterrupted code, but I would like to keep this for better purposes than updating display many times per second. It would be statically driven nixie tubes. Also I don't want to put sleep just to lower update rate.

         

      Thanks for reply,

         

      Stanislav

        • 1. Re: PPS from RTC component
          maskrtnik01_1570836

          Also, when I log out, my question disappears. Is this normal forum behavior, or some kind of a bug?

          • 2. Re: PPS from RTC component
            anks

            On page#20 of RTC v2_0 datasheet ,it is mentioned about specific function which would be called at appropriate intervals based on the setting configured with RTC_WriteIntervalMask() function:

               

             Every Second handler – RTC_EverySecondHandler()

               

            Stub routines for these functions are provided in which you can add your own code. The routine stubs are generated in the RTC_INT.c file the first time the project is built. Your code must be added between the provided comment tags as follows:

               


            static void RTC_EverySecondHandler( void )
            {
            /* Place your every second handler code here. */
            /* `#START EVERY_SECOND_HANDLER_CODE` */
            /* `#END` */
            }

               

            The interval mask register is a write-only register that allows you to control handling of interrupt stubs of the RTC component.When writing the interval mask register, you must use the bit-field definitions as defined in the header (.h) file. The definitions for the interval mask register are as follows:

               

            RTC_INTERVAL_SEC_MASK – The second interval mask allows handling an interrupt stub every second.

            • 3. Re: PPS from RTC component
              maskrtnik01_1570836

              Thank you for reply. I had not already tested this on device, but inside IDE this works well - my code is preserved, when I change design.