17.3.2 RTC Use Model
Use the following steps to use RTC:
- Configure the RTC from Libero SoC using the RTC configuration window.
- Initialize the RTC driver using the MSS_RTC_init() function.
- Use the MSS_RTC_configure() function to configure the RTC.
- Set the match value of the RTC using the MSS_RTC_set_rtc_match() function.
- Use the MSS_RTC_enable_irq() function to enable the RTC match interrupt.
- Call the MSS_RTC_start() function to increment RTC.
- On reaching the match value, RTC generates the interrupt. Clear the interrupt.
- 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.