Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


RTC standalone driver


Introduction

The 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) is
provided 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 driver
https://github.com/Xilinx/embeddedsw/commits/master/XilinxProcessorIPLib/drivers/rtcpsu

Driver source code is organized into different folders. Below diagram shows the rtcpsu driver source organization
rtcpsu
|
-- 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 Features

The RTC Standalone driver support the below things.
  • All controller features supported.

Known Issues and Limitations

  • None.

Test cases

  • Refer below path for testing different examples for each feature of the IP.

https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/rtcpsu/examples



Change Log

  • 2017.1

    • Summary
      • rtcpsu : Fixed compilation warnings
      • RTCPSU : Corrected calibration and frequency macros.
      • rtcpsu: Added readme.txt file to generate doxygen for examples
    • Commits
      • dc92361 : rtcpsu : Fixed compilation warnings.
      • 91ee3a6 : RTCPSU : Corrected calibration and frequency macros.
      • 49a6a78 : rtcpsu: Added readme.txt file to generate doxygen for examples.
  • 2017.2

    • Summary
      • rtcpsu: Modified filename tag in examples
    • Commits
      • d65236a : rtcpsu: Modified filename tag in examples
  • 2017.3

    • Summary
      • rtcpsu: Fixed compilation warnings
      • rtcpsu: Code cleanup
    • Commits
      • 61974ae : rtcpsu: Fixed compilation warnings.
      • dc74ed7 : rtcpsu: Code cleanup.
  • 2018.1

    • None
  • 2018.2

    • None
  • 2018.3

    • None
  • 2019.1

    • Summary
      • rtcpsu: Fixed MISRA-C warnings
    • Commits
      • cd670acMISRA-C:No brackets to loop body
      • f79d426MISRA-C:No brackets to then/else
      • e8eb02aMISRA-C:Casting operation to a pointer
      • fc917b6MISRA-C:Array has no bounds specified
      • dddc939MISRA-C:Literal value requires a U suffix
      • b37d04eMISRA-C:Logical conjunctions need brackets
      • dd928e7MISRA-C:Pointer param should be declared pointer to const
      • 405723bUpdated year and change version history


  • 2019.2
    • Summary
      • rtcpsu: Corrected calibration algorithm
      • rtcpsu: Updated set calibration example with right sequence
    • Commits
      • 575af1b1  rtcpsu: Corrected calibration algorithm
      • 09ec4457 rtcpsu: Updated set calibration example with right sequence
  • 2020.1

    • None
  • 2020.2

    • Summary
      • rtcpsu: Update Makefile for parallel make execution
      • rtcpsu: MISRA-C fixes
    • Commits
      • 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