A N 6 3 3
34
Rev. 0.7
9.4.3. Timer Peripheral Module
The timer-related source files, called timer.h and timer.c, are located in the /src/drivers/ folder. This 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 files are set to a
frequency of 1 kHz (1 ms). By using the timer with 1 ms settings, timeouts that are a multiple of 1 ms can be easily
implemented. Timer-related operations provide options to start or stop counting. Additionally, interrupts can be
generated when the low byte of the timer overflows. Timers can also be checked for expiration.
Function Name:
void
vTmr_StartTmr2
(U8 biPrescaler, U16 wiPeriod, U8 biItEnable, U8 biExtClk-
Sel)
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 biExtClk-
Sel)
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.
Содержание EZRADIOPRO Si4060
Страница 24: ...AN633 24 Rev 0 7 Figure 20 Supply Current versus Time Diagram from Shutdown to RX State...
Страница 67: ...AN633 Rev 0 7 67 Figure 48 Variable Length Packet Reception Flowchart...
Страница 69: ...AN633 Rev 0 7 69 Figure 50 Packet Matching Reception Flowchart...
Страница 73: ...AN633 Rev 0 7 73 Figure 54 Packet Reception with Automatic RX Hopping Flowchart...
Страница 75: ...AN633 Rev 0 7 75 Figure 56 Packet Reception with Manual Rx Hopping...
Страница 80: ...AN633 80 Rev 0 7 Figure 62 Long Packet Transmission Workflow...
Страница 81: ...AN633 Rev 0 7 81 Figure 63 Long Packet RX Flowchart...