You are here

PPS from RTC component | Cypress Semiconductor

PPS from RTC component

Summary: 3 Replies, Latest post by maskrtnik01_1570836 on 22 Nov 2016 12:43 AM PST
Verified Answers: 1
Last post
Log in to post new comments.
maskrtnik01_1570836's picture
22 posts


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,


maskrtnik01_1570836's picture
22 posts

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

ANKS's picture
Cypress Employee
315 posts

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. */
/* `#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.


maskrtnik01_1570836's picture
22 posts

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.

Log in to post new comments.