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.
Содержание Si4455 Series
Страница 8: ...AN692 8 Rev 0 4 Figure 6 Device Configuration Options ...
Страница 22: ...AN692 22 Rev 0 4 Figure 21 Supply Current versus Time Diagram from Shutdown to RX State ...
Страница 23: ...AN692 Rev 0 4 23 4 4 Radio Chip Waking Up Figure 22 Radio Wake Up Process ...
Страница 25: ...AN692 Rev 0 4 25 4 5 EZConfig and Configuration Options Figure 23 Radio RF Initialization Process ...
Страница 35: ...AN692 Rev 0 4 35 Figure 32 Transmission Flowchart ...
Страница 39: ...AN692 Rev 0 4 39 Figure 33 Reception Flowchart ...
Страница 41: ...AN692 Rev 0 4 41 Figure 34 Bidirectional Variable Packet Example Project Flowchart ...
Страница 47: ...AN692 Rev 0 4 47 Figure 41 Long Packet Transmission Flowchart ...
Страница 48: ...AN692 48 Rev 0 4 Figure 42 Long Packet RX Flowchart ...