Real-Time Clock (RTC_PDL)
The Real-Time Clock (RTC_PDL) Component provides an application interface for keeping track of time and date. It provides access to the HW real-time clock. It is driven by the clock that drives the BakClk. You need to choose the source for BakClk as the input clock source in the Design-Wide Resources Clock Editor (Configure System Clocks).
The RTC_PDL Component is a graphical configuration entity built on top of the cy_rtc driver available in the PDL. It allows schematic-based connections and hardware configuration as defined by the Component Configure dialog.
The time can be represented in either 12-hour format or 24-hour format. The date representation can be in "MM/DD/YYYY", "DD/MM/YYYY" or "YYYY/MM/DD" format. The RTC_PDL Component keeps track of second, minute, hour, day of the week, day of the month, month, and year. The day of the week is automatically calculated from the day, month, and year. It automatically accounts for leap year changes. Leap year is identified as the year, which is a multiple of 4 or 400 but not 100.
Daylight savings time (DST) may optionally be enabled and supports any start and end date. The start and end dates can be fixed date like 24 March or relative like the second or last Sunday in March.
This Component also has an optional alarm feature, which provides match detection for second, minute, hour, day of week, day of month, and month values. The RTC_PDL Component provides two alarm functions physically, which can trigger interrupts to ask an appropriate action on time. The alarm flexibility supports periodic alarms (such as every minute) or a single alarm (such as 10:45 on 28 September, 2043).
When the external 32.768-kHz Watch-crystal oscillator (WCO) is absent on the board, the RTC_PDL Component can be driven by an external 32.768-kHz square clock source, or by an external 50-Hz or 60-Hz sine-wave clock source; for example, the wall AC frequency.
- Different hour format support
- Multiple alarm function (two-alarms)
- Daylight Savings Time option support
- Automatic leap year compensation
- Option to drive the RTC by an external 50-Hz or 60-Hz clock source
- Peripheral Driver Library (PDL) Component (PDL Application Programming Interface (API) only)