iLLD_TC29x
1.0
|
The Stm Standard driver provides APIs to initialize, configure and control the Stm.
In the following sections it will be described, how to integrate the driver into the application framework.
Include following header file into your C code:
Declare STM variables :
See also How to define Interrupts?
Define priorities for the Interrrupt handlers. This is normally done in the Ifx_IntPrioDef.h file:
Add the interrupt service routines to your C code. They have to call the Stm interrupt handlers: please take care in choosing number of ticks, the below example code will raise an interrupt evry time the specified number of ticks have been elapsed.
Finally install the interrupt handlers in your initialisation function:
The STM module can be configured to generate an interrupt at every compare match of the selected comaparator with the desired compare value, the interrupt can further be routed to other comparator.
The module initialisation can be done as followed.
Now the Stm shall generate interrupts regularly based on the configured time !