A N 6 9 2
60
Rev 0.4
5.4.3. Timer Peripheral Module
The timer related source files, called ' timer.h' and 'timer.c', can be found in the /src/drivers/ folder. The module
handles two 16-bit timers, timer2 and timer3. The most accurate timing interval can be calculated from the
frequency of the system clock which is generally 24.5 MHz. External clock sources can be selected as timer input
and the required timing frequency can be adjusted thoroughly with several different prescalers. In general, the
timer settings belonging to the “heart-beat frequency” of 1 kHz (1 ms) are prepared. Using the timer with the 1 ms
settings, timeouts multiple of 1 ms can be easily implemented. Timer related operations can give possibilities to
start or stop counting. Additionally, interrupts can be generated when the low byte of the timer overflows. Timers
can also be checked whether get expired or not.
Function Name:
void
vTmr_StartTmr2
(U8 biPrescaler, U16 wiPeriod, U8 biItEnable, U8 biExtClkSel)
Description:
This function is used to start Timer 2 in the specified mode.
Input Parameter(s):
biPrescaler : Prescaler value of timer
(use predefined constants: bTmr_Tmr2One_c, bTmr_Tmr2Both_c)
wwiPeriod : The duration of the timing
biItEnable : Enables timer IT if TRUE, disables it if FALSE
biExtClkSel External clock select
(use predefined constants: bTmr_TxXCLK_00_c etc.)
Return Value:
None.
Function Name:
BIT
gTmr_Tmr2Expired
(void)
Description:
This function is used to check if Timer 2 is expired.
Return Value:
True if timer is expired (also stops the timer).
Note:
Function clears the IT status flag as well.
Function Name:
void
vTmr_StartTmr3
(U8 biPrescaler, U16 wiPeriod, U8 biItEnable, U8 biExtClkSel)
Description:
This function is used to start Timer 3 in the specified mode.
Input Parameter(s):
biPrescaler : Prescaler value of timer
(use predefined constants: bTmr_Tmr3One_c, bTmr_Tmr3Both_c)
wwiPeriod : The duration of the timing
biItEnable : Enables timer IT if TRUE, disables it if FALSE
biExtClkSel : External clock select
(use predefined constants: bTmr_TxXCLK_00_c etc.)
Return Value:
None
Function Name:
BIT gTmr_Tmr3Expired
(void)
Description:
This function is used to check if Timer 3 is expired.
Return Value:
True if timer is expired (also stops the timer).
Note:
Function clears the IT status flag as well.
Summary of Contents for Si4455 Series
Page 8: ...AN692 8 Rev 0 4 Figure 6 Device Configuration Options ...
Page 22: ...AN692 22 Rev 0 4 Figure 21 Supply Current versus Time Diagram from Shutdown to RX State ...
Page 23: ...AN692 Rev 0 4 23 4 4 Radio Chip Waking Up Figure 22 Radio Wake Up Process ...
Page 35: ...AN692 Rev 0 4 35 Figure 32 Transmission Flowchart ...
Page 39: ...AN692 Rev 0 4 39 Figure 33 Reception Flowchart ...
Page 41: ...AN692 Rev 0 4 41 Figure 34 Bidirectional Variable Packet Example Project Flowchart ...
Page 47: ...AN692 Rev 0 4 47 Figure 41 Long Packet Transmission Flowchart ...
Page 48: ...AN692 48 Rev 0 4 Figure 42 Long Packet RX Flowchart ...