System Timer
UG0331 User Guide Revision 15.0
619
19.3
How to Use Timer
This section describes how to use the Timer in an application.
19.3.1
Design Flow
Follow the steps described below to use Timer in an application.
1.
By default Timer module is enabled in the Libero project
2.
Generate the component by clicking
Generate Component
or by selecting
SmartDesign >
Generate Component
. For more information on generation of the component, refer to the
. The firmware driver folder and SoftConsole workspace is included in the project.
Click the highlighted
Configure firmware
as shown in the following figure to find the Timer drivers.
Figure 265 •
Timer Driver User Guide
3.
Click
Generate Bitstream
under
Program Design
to complete *.fdb file generation. 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_timer firmware driver. The firmware driver, mss_timer (mss_timer.h) which provides a set of
functions for controlling the Timer, can also be downloaded from the Microsemi firmware catalog.
The following table lists the APIs for Timer.
For more information on the APIs, refer to the
SmartFusion2_MSS_Timer_Driver_UG
(shown in the
preceding figure).
Table 615 •
MSS Timer APIs
Category
API
Description and Usage
Initialization functions
MSS_TIM1_init()
Initializes Timer1
MSS_TIM2_init()
Initializes Timer2
MSS_TIM64_init()
Initializes 64-bit Timer