RTC standalone driver
IntroductionThe Zynq® UltraScale+™ MPSoC real time clock (RTC) provides the real time even when the device is powered off.When the device is off, the RTC is switched to the battery power supply. A battery-backed RAM (BBRAM) isprovided for when device is operating in the battery mode. However, the RTC controller
and user interface are only
operational when the low-power domain supply is ON.
The RTC has an alarm function that generates an alarm at a specific time and date with a 136-year range.
The RTC also has periodic software calibration and logic to correct the static fractional inaccuracy of an oscillator.
How to enable
Source Path for the driverhttps://github.com/Xilinx/embeddedsw/commits/master/XilinxProcessorIPLib/drivers/rtcpsuDriver source code is organized into different folders. Below diagram shows the rtcpsu driver source organizationrtcpsu|-- doc - Provides the API and data structure details|-- examples - Reference application to show how to use the driver APIs and calling sequence|-- src - Driver source files
Features Supported in the driver
Controller Features supported
- Maintains the real time, even when the device is off (powered-off).
- Has the capability to generate an alarm at a specific time and date.
- Includes the means for periodic software calibration of the RTC.
- Includes logic to correct the static fractional inaccuracy of the oscillator.
- Keeps track of time within a window of more than 136 years (232 seconds) from a reference point.
- Implemented as three counters.
- 16-bit tick counter creates one second based on the crystal clock.
- 4-bit fraction counter keeps track of the static crystal errors in one second that is less than one oscillator tick.
- 32-bit seconds counter holds the real time and allows on-demand reload whenever current time of the RTC is set.
- Allows wake-up at a specific second within the 136 years (32-bit alarm)
Driver Supported FeaturesThe RTC Standalone driver support the below things.
- All controller features supported.
Known Issues and Limitations
- Refer below path for testing different examples for each feature of the IP.
- rtcpsu : Fixed compilation warnings
- RTCPSU : Corrected calibration and frequency macros.
- rtcpsu: Added readme.txt file to generate doxygen for examples
- dc92361 : rtcpsu : Fixed compilation warnings.
- 91ee3a6 : RTCPSU : Corrected calibration and frequency macros.
- 49a6a78 : rtcpsu: Added readme.txt file to generate doxygen for examples.
- rtcpsu: Modified filename tag in examples
- d65236a : rtcpsu: Modified filename tag in examples
- rtcpsu: Fixed compilation warnings
- rtcpsu: Code cleanup
- 61974ae : rtcpsu: Fixed compilation warnings.
- dc74ed7 : rtcpsu: Code cleanup.
- rtcpsu: Fixed MISRA-C warnings
- cd670ac: MISRA-C:No brackets to loop body
- f79d426: MISRA-C:No brackets to then/else
- e8eb02a: MISRA-C:Casting operation to a pointer
- fc917b6: MISRA-C:Array has no bounds specified
- dddc939: MISRA-C:Literal value requires a U suffix
- b37d04e: MISRA-C:Logical conjunctions need brackets
- dd928e7: MISRA-C:Pointer param should be declared pointer to const
- 405723b: Updated year and change version history
- rtcpsu: Corrected calibration algorithm
- rtcpsu: Updated set calibration example with right sequence
- 575af1b1 rtcpsu: Corrected calibration algorithm
- 09ec4457 rtcpsu: Updated set calibration example with right sequence
- rtcpsu: Update Makefile for parallel make execution
- rtcpsu: MISRA-C fixes
- ab20b8 rtcpsu: Update Makefile for parallel make execution
- 92526b rtcpsu:MISRA-C: Remove const keyword
- ea1f2b rtcpsu: Fixed MISRAC rule 4.5 violation
- c41c38 rtcpsu: Fixed MISRAC rule 10.4 violation
- 8a0f2d rtcpsu: Fixed MISRAC rule 10.6 violation
- ac9a95 rtcpsu: Fixed MISRAC rule 10.3 violation
- f8fe2f rtcpsu: Fixed MISRAC rule 8.4 violation