Watchdog Timer
UG0331 User Guide Revision 15.0 636
4. Generate the component by clicking Generate Component or by selecting SmartDesign >
Generate Component. For more information on generation of the component, refer to the Libero
SoC User Guide. The firmware driver folder and SoftConsole workspace is included in the project.
Click the highlighted Configure firmware button as shown in the following figure to find the
watchdog timer drivers.
Figure 273 • RTC Driver User Guide
5. Click Generate Bitstream under Program Design to complete *.fdb file generation.
6. Double-click Export Firmware under Handoff Design for Firmware Development in the Libero
SoC design flow window to generate the SoftConsole Firmware Project. The SoftConsole folder
contains the mss_watchdog firmware driver. The firmware driver, mss_watchdog (mss_watchdog.h),
which provides a set of functions for controlling the watchdog timer can also be downloaded from the
Microsemi firmware catalog. The following table lists the APIs for Watchdog Timer.
For more information on the APIs, refer to the SmartFusion2_MSS_Watchdog_Driver_UG.
Table 634 • Watchdog Timer APIs
Category API Description and Usage
Initialization MSS_WD_init() Initializes Watchdog Timer
Reading the watchdog timer
current value and status
MSS_WD_current_value() Returns the current value of the watchdog's down
counter
MSS_WD_status() Returns the status of the watchdog
Refreshing the watchdog
timer value
MSS_WD_reload() Causes the watchdog to reload its down counter
timer with the load value
MSS_WD_timeout_occured() Reports the occurrence of a timeout event
MSS_WD_clear_timeout_event() Clears the hardware's report of a time out event
Time-out and wake-up
interrupts control
MSS_WD_enable_timeout_irq() Enables the watchdog’s time out interrupt
MSS_WD_disable_timeout_irq() Disables the generation of the NMI interrupt
MSS_WD_enable_wakeup_irq() Enables the SmartFusion2 wakeup interrupt
MSS_WD_clear_wakeup_irq() Clears the wakeup interrupt
MSS_WD_disable_wakeup_irq() Disables the SmartFusion2 wakeup interrupt
MSS_WD_clear_timeout_irq() Clears the watchdog’s time out interrupt