Appiko
Functions
Timer Exported Functions

Functions

void S2LPTimerSetRxTimerStopCondition (RxTimeoutStopCondition xStopCondition)
 Set the RX timeout stop conditions. More...
 
void S2LPTimerLdcrMode (SFunctionalState xNewState)
 Enables or Disables the LDCR mode. More...
 
void S2LPTimerLdcrAutoReload (SFunctionalState xNewState)
 Enables or Disables the LDCR timer reloading with the value stored in the LDCR_RELOAD registers. More...
 
SFunctionalState S2LPTimerLdcrGetAutoReload (void)
 Return the LDCR timer reload bit. More...
 
void S2LpTimerFastRxTermTimer (SFunctionalState xNewState)
 Enables the Fast RX termination timer. More...
 
void S2LpSetTimerFastRxTermTimer (uint8_t fast_rx_word)
 Set the Fast RX termination timer word. When the timer counter will reach this word, the timer expires. The timer counter is clocked at frequency: fCLK/24/2^CHFLT_E. More...
 
void S2LpSetTimerFastRxTermTimerUs (uint32_t fast_rx_us)
 Set the Fast RX termination timer word starting from a us value. The timer counter is clocked at frequency: fCLK/24/2^CHFLT_E. More...
 
void S2LPTimerSetRxTimer (uint8_t cCounter, uint8_t cPrescaler)
 Set the RX timeout timer initialization registers with the values of COUNTER and PRESCALER according to the formula: Trx=PRESCALER*COUNTER*Tck. Remember that it is possible to have infinite RX_Timeout writing 0 in the RX_Timeout_Counter and/or RX_Timeout_Prescaler registers. More...
 
void S2LPTimerSetRxTimerUs (uint32_t lDesiredUsec)
 Set the RX timeout timer counter and prescaler from the desired value in ms. it is possible to fix the RX_Timeout to a minimum value of 50.417us to a maximum value of about 3.28 s. More...
 
void S2LPTimerSetRxTimerCounter (uint8_t cCounter)
 Set the RX timeout timer counter. If it is equal to 0 the timeout is infinite. More...
 
void S2LPTimerSetRxTimerPrescaler (uint8_t cPrescaler)
 Set the RX timeout timer prescaler. If it is equal to 0 the timeout is infinite. More...
 
void S2LPTimerGetRxTimerUs (uint32_t *plTimeoutUsec, uint8_t *pcCounter, uint8_t *pcPrescaler)
 Return the RX timeout timer. More...
 
void S2LPTimerSetWakeUpTimer (uint8_t cCounter, uint8_t cPrescaler)
 Set the LDCR wake up timer initialization registers with the values of COUNTER and PRESCALER according to the formula: Twu=(PRESCALER +1)*(COUNTER+1)*Tck, where Tck = 28.818 us. The minimum vale of the wakeup timeout is 28.818us (PRESCALER and COUNTER equals to 0) and the maximum value is about 1.89 s (PRESCALER anc COUNTER equals to 255). More...
 
void S2LPTimerSetWakeUpTimerUs (uint32_t lDesiredUsec)
 Set the LDCR wake up timer counter and prescaler from the desired value in ms, according to the formula: Twu=(PRESCALER +1)*(COUNTER+1)*Tck, where Tck = 28.818 us. The minimum vale of the wakeup timeout is 28.818us (PRESCALER and COUNTER equals to 0) and the maximum value is about 1.89 s (PRESCALER anc COUNTER equals to 255). More...
 
void S2LPTimerSetWakeUpTimerCounter (uint8_t cCounter)
 Set the LDCR wake up timer counter. Remember that this value is incresead by one in the Twu calculation. Twu=(PRESCALER +1)*(COUNTER+1)*Tck, where Tck = 28.818 us. More...
 
void S2LPTimerSetWakeUpTimerPrescaler (uint8_t cPrescaler)
 Set the LDCR wake up timer prescaler. Remember that this value is incresead by one in the Twu calculation. Twu=(PRESCALER +1)*(COUNTER+1)*Tck, where Tck = 28.818 us. More...
 
void S2LPTimerSetWakeUpTimerReloadUs (uint32_t lDesiredUsec)
 Set the LDCR wake up reload timer counter and prescaler from the desired value in ms, according to the formula: Twu=(PRESCALER +1)*(COUNTER+1)*Tck, where Tck = 28.818 us. The minimum vale of the wakeup timeout is 28.818us (PRESCALER and COUNTER equals to 0) and the maximum value is about 1.89 s (PRESCALER anc COUNTER equals to 255). More...
 
void S2LPTimerGetWakeUpTimerUs (uint32_t *plWakeUpUsec, uint8_t *pcCounter, uint8_t *pcPrescaler, uint8_t *pcMulti)
 Return the LDCR wake up timer, according to the formula: Twu=(PRESCALER +1)*(COUNTER+1)*Tck, where Tck = 28.818 us. More...
 
void S2LPTimerSetWakeUpTimerReload (uint8_t cCounter, uint8_t cPrescaler, uint8_t cMulti)
 Set the LDCR wake up timer reloading registers with the values of COUNTER and PRESCALER according to the formula: Twu=(PRESCALER +1)*(COUNTER+1)*Tck, where Tck = 28.818 us. The minimum vale of the wakeup timeout is 28.818us (PRESCALER and COUNTER equals to 0) and the maximum value is about 1.89 s (PRESCALER anc COUNTER equals to 255). More...
 
void S2LPTimerSetWakeUpTimerReloadCounter (uint8_t cCounter)
 Set the LDCR wake up timer reload counter. Remember that this value is incresead by one in the Twu calculation. Twu=(PRESCALER +1)*(COUNTER+1)*Tck, where Tck = 28.818 us. More...
 
void S2LPTimerSetWakeUpTimerReloadPrescaler (uint8_t cPrescaler)
 Set the LDCR wake up timer reload prescaler. Remember that this value is incresead by one in the Twu calculation. Twu=(PRESCALER +1)*(COUNTER+1)*Tck, where Tck = 28.818 us. More...
 
void S2LPTimerGetWakeUpTimerReloadUs (uint32_t *plWakeUpReloadUsec, uint8_t *pcCounter, uint8_t *pcPrescaler, uint8_t *pcMulti)
 Return the LDCR wake up reload timer, according to the formula: Twu=(PRESCALER +1)*(COUNTER+1)*Tck, where Tck = 28.818 us. More...
 
uint16_t S2LPTimerGetRcoFrequency (void)
 Computes and Return the RCO frequency. This frequency depends on the xtal frequency and the XTAL bit in register 0x01. More...
 
void S2LPTimerCalibrationRco (SFunctionalState xCalibration)
 Enables the RCO autocalibration when the device make the transition READY -> SLEEP. More...
 
void S2LPTimerSleepB (SFunctionalState en)
 Enable the SLEEP_B mode. SLEEP_A and SLEEP_B are mutually exclusive. More...
 

Detailed Description

Function Documentation

◆ S2LpSetTimerFastRxTermTimer()

void S2LpSetTimerFastRxTermTimer ( uint8_t  fast_rx_word)
Parameters
fast_rx_word: the FAST_RX_TIMER word (register 0x54 value).
Return values
None

Definition at line 687 of file S2LP_Timer.c.

References g_xStatus.

◆ S2LpSetTimerFastRxTermTimerUs()

void S2LpSetTimerFastRxTermTimerUs ( uint32_t  fast_rx_us)
Parameters
fast_rx_us: fast rx termination target value in us.
Return values
None
Note
: the user should care about the max value that can be set unless asserts are used.

Definition at line 700 of file S2LP_Timer.c.

◆ S2LPTimerCalibrationRco()

void S2LPTimerCalibrationRco ( SFunctionalState  xCalibration)
Parameters
enif it is S_ENABLE: RCO calibration is enabled. if it is S_DISABLE: RCO calibration is disabled.
Return values
None

Definition at line 726 of file S2LP_Timer.c.

◆ S2LpTimerFastRxTermTimer()

void S2LpTimerFastRxTermTimer ( SFunctionalState  xNewState)
Parameters
None
Return values
None

Definition at line 664 of file S2LP_Timer.c.

◆ S2LPTimerGetRcoFrequency()

uint16_t S2LPTimerGetRcoFrequency ( void  )
Return values
RCOfrequency in Hz as an uint16_t.

Definition at line 642 of file S2LP_Timer.c.

References S2LPRadioGetXtalFrequency().

◆ S2LPTimerGetRxTimerUs()

void S2LPTimerGetRxTimerUs ( uint32_t *  plTimeoutUsec,
uint8_t *  pcCounter,
uint8_t *  pcPrescaler 
)
Parameters
plTimeoutUsecpointer to the variable in which the timeout expressed in microseconds has to be stored. If the returned value is 0, it means that the RX_Timeout is infinite. This parameter must be a uint32_t*.
pcCounterpointer to the variable in which the timer counter has to be stored. This parameter must be an uint8_t*.
pcPrescalerpointer to the variable in which the timer prescaler has to be stored. This parameter must be an uint8_t*.
Return values
None.

Definition at line 405 of file S2LP_Timer.c.

References g_xStatus.

◆ S2LPTimerGetWakeUpTimerReloadUs()

void S2LPTimerGetWakeUpTimerReloadUs ( uint32_t *  plWakeUpReloadUsec,
uint8_t *  pcCounter,
uint8_t *  pcPrescaler,
uint8_t *  pcMulti 
)
Parameters
plWakeUpReloadUsecpointer to the variable in which the wake-up reload time expressed in milliseconds has to be stored. This parameter must be a uint32_t*.
pcCounterpointer to the variable in which the timer counter has to be stored. This parameter must be an uint8_t*.
pcPrescalerpointer to the variable in which the timer prescaler has to be stored. This parameter must be an uint8_t*.
Return values
None.

Definition at line 598 of file S2LP_Timer.c.

◆ S2LPTimerGetWakeUpTimerUs()

void S2LPTimerGetWakeUpTimerUs ( uint32_t *  plWakeUpUsec,
uint8_t *  pcCounter,
uint8_t *  pcPrescaler,
uint8_t *  pcMulti 
)
Parameters
plWakeUpUsecpointer to the variable in which the wake-up time expressed in milliseconds has to be stored. This parameter must be a uint32_t*.
pcCounterpointer to the variable in which the timer counter has to be stored. This parameter must be an uint8_t*.
pcPrescalerpointer to the variable in which the timer prescaler has to be stored. This parameter must be an uint8_t*.
Return values
None.

Definition at line 497 of file S2LP_Timer.c.

◆ S2LPTimerLdcrAutoReload()

void S2LPTimerLdcrAutoReload ( SFunctionalState  xNewState)
Parameters
xNewStatenew state for LDCR reloading. This parameter can be: S_ENABLE or S_DISABLE.
Return values
None.

Definition at line 311 of file S2LP_Timer.c.

◆ S2LPTimerLdcrGetAutoReload()

SFunctionalState S2LPTimerLdcrGetAutoReload ( void  )
Parameters
None.
Return values
SFunctionalStatevalue of the reload bit.

Definition at line 332 of file S2LP_Timer.c.

References g_xStatus.

◆ S2LPTimerLdcrMode()

void S2LPTimerLdcrMode ( SFunctionalState  xNewState)
Parameters
xNewStatenew state for LDCR mode. This parameter can be: S_ENABLE or S_DISABLE.
Return values
None.

Definition at line 289 of file S2LP_Timer.c.

◆ S2LPTimerSetRxTimer()

void S2LPTimerSetRxTimer ( uint8_t  cCounter,
uint8_t  cPrescaler 
)
Parameters
cCountervalue for the timer counter. This parameter must be an uint8_t.
cPrescalervalue for the timer prescaler. This parameter must be an uint8_t.
Return values
None.

Definition at line 348 of file S2LP_Timer.c.

References g_xStatus.

◆ S2LPTimerSetRxTimerCounter()

void S2LPTimerSetRxTimerCounter ( uint8_t  cCounter)
Parameters
cCountervalue for the timer counter. This parameter must be an uint8_t.
Return values
None.

Definition at line 376 of file S2LP_Timer.c.

References g_xStatus.

◆ S2LPTimerSetRxTimerPrescaler()

void S2LPTimerSetRxTimerPrescaler ( uint8_t  cPrescaler)
Parameters
cPrescalervalue for the timer prescaler. This parameter must be an uint8_t.
Return values
None

Definition at line 388 of file S2LP_Timer.c.

References g_xStatus.

◆ S2LPTimerSetRxTimerStopCondition()

void S2LPTimerSetRxTimerStopCondition ( RxTimeoutStopCondition  xStopCondition)
Parameters
xStopConditionnew stop condition. This parameter can be any value of RxTimeoutStopCondition.
Return values
None

Definition at line 620 of file S2LP_Timer.c.

◆ S2LPTimerSetRxTimerUs()

void S2LPTimerSetRxTimerUs ( uint32_t  lDesiredUsec)
Parameters
lDesiredUsecdesired timer value. This parameter must be a uint32_t.
Return values
None

Definition at line 362 of file S2LP_Timer.c.

References g_xStatus, and S2LPTimerComputeRxTimerRegValues().

◆ S2LPTimerSetWakeUpTimer()

void S2LPTimerSetWakeUpTimer ( uint8_t  cCounter,
uint8_t  cPrescaler 
)
Parameters
cCountervalue for the timer counter. This parameter must be an uint8_t.
cPrescalervalue for the timer prescaler. This parameter must be an uint8_t.
Return values
None.

Definition at line 428 of file S2LP_Timer.c.

References g_xStatus.

◆ S2LPTimerSetWakeUpTimerCounter()

void S2LPTimerSetWakeUpTimerCounter ( uint8_t  cCounter)
Parameters
cCountervalue for the timer counter. This parameter must be an uint8_t.
Return values
None.

Definition at line 468 of file S2LP_Timer.c.

References g_xStatus.

◆ S2LPTimerSetWakeUpTimerPrescaler()

void S2LPTimerSetWakeUpTimerPrescaler ( uint8_t  cPrescaler)
Parameters
cPrescalervalue for the timer prescaler. This parameter must be an uint8_t.
Return values
None.

Definition at line 481 of file S2LP_Timer.c.

References g_xStatus.

◆ S2LPTimerSetWakeUpTimerReload()

void S2LPTimerSetWakeUpTimerReload ( uint8_t  cCounter,
uint8_t  cPrescaler,
uint8_t  cMulti 
)
Parameters
cCounterreload value for the timer counter. This parameter must be an uint8_t.
cPrescalerreload value for the timer prescaler. This parameter must be an uint8_t.
Return values
None.

Definition at line 525 of file S2LP_Timer.c.

◆ S2LPTimerSetWakeUpTimerReloadCounter()

void S2LPTimerSetWakeUpTimerReloadCounter ( uint8_t  cCounter)
Parameters
cCountervalue for the timer counter. This parameter must be an uint8_t.
Return values
None

Definition at line 569 of file S2LP_Timer.c.

References g_xStatus.

◆ S2LPTimerSetWakeUpTimerReloadPrescaler()

void S2LPTimerSetWakeUpTimerReloadPrescaler ( uint8_t  cPrescaler)
Parameters
cPrescalervalue for the timer prescaler. This parameter must be an uint8_t.
Return values
None

Definition at line 582 of file S2LP_Timer.c.

References g_xStatus.

◆ S2LPTimerSetWakeUpTimerReloadUs()

void S2LPTimerSetWakeUpTimerReloadUs ( uint32_t  lDesiredUsec)
Parameters
lDesiredUsecdesired timer value in us.
Return values
None.

Definition at line 546 of file S2LP_Timer.c.

References S2LPTimerComputeWakeupTimerRegValues().

◆ S2LPTimerSetWakeUpTimerUs()

void S2LPTimerSetWakeUpTimerUs ( uint32_t  lDesiredUsec)
Parameters
fDesiredMsecdesired timer value. This parameter must be a float.
Return values
None.

Definition at line 444 of file S2LP_Timer.c.

References S2LPTimerComputeWakeupTimerRegValues().

◆ S2LPTimerSleepB()

void S2LPTimerSleepB ( SFunctionalState  en)
Parameters
enif it is S_ENABLE: SLEEP_B will be set if it is S_DISABLE: SLEEP_A will be set
Return values
None

Definition at line 749 of file S2LP_Timer.c.