17.3.2 RTC Use Model

Use the following steps to use RTC:

  1. Configure the RTC from Libero SoC using the RTC configuration window.
  2. Initialize the RTC driver using the MSS_RTC_init() function.
  3. Use the MSS_RTC_configure() function to configure the RTC.
  4. Set the match value of the RTC using the MSS_RTC_set_rtc_match() function.
  5. Use the MSS_RTC_enable_irq() function to enable the RTC match interrupt.
  6. Call the MSS_RTC_start() function to increment RTC.
  7. On reaching the match value, RTC generates the interrupt. Clear the interrupt.
  8. Stop RTC increment using the MSS_RTC_stop( ) function.
Important: The MSS RTC does not support full behavioral simulation models. See SmartFusion2 MSS BFM Simulation User Guide for more information.