Functions | |
void | Cy_LTC_Init (void) |
Initializes the lifetime counter to its default state. More... | |
bool | Cy_LTC_IsEnabled (void) |
Returns the lifetime counter HW actual status. More... | |
void | Cy_LTC_Enable (void) |
Enables the lifetime counter and the counter of the lifetime counter starts counting up. More... | |
void | Cy_LTC_Disable (void) |
Disables the lifetime counter and the counter of the lifetime counter stops counting, but is not cleared to 0. More... | |
void | Cy_LTC_SetDivider (cy_en_ltc_div_t divider) |
Configures the divide ratio for the pre-selector. More... | |
cy_en_ltc_div_t | Cy_LTC_GetDivider (void) |
Returns the divide ratio for the pre-selector value. More... | |
void | Cy_LTC_SetCounterValue (uint32_t count) |
Configures lifetime counter current value. More... | |
uint32_t | Cy_LTC_GetCounterValue (void) |
Returns lifetime counter current value. More... | |
void | Cy_LTC_SetWakeup (uint32_t wakeupValue) |
Configures the lifetime wakeup value. More... | |
uint32_t | Cy_LTC_GetWakeup (void) |
Returns the lifetime wakeup value. More... | |
void | Cy_LTC_SetInterrupt (void) |
Triggers an interrupt with software. More... | |
bool | Cy_LTC_GetInterruptStatus (void) |
Returns the interrupt status. More... | |
void | Cy_LTC_ClearInterrupt (void) |
Clears the lifetime counter interrupt factor. More... | |
void | Cy_LTC_SetInterruptMask (bool enable) |
Enables or disables the lifetime counter interrupt handler triggering. More... | |
bool | Cy_LTC_GetInterruptStatusMasked (void) |
Gets Bitwise "AND" between the interrupt request and mask configuration. More... | |
void Cy_LTC_Init | ( | void | ) |
Initializes the lifetime counter to its default state.
bool Cy_LTC_IsEnabled | ( | void | ) |
Returns the lifetime counter HW actual status.
void Cy_LTC_Enable | ( | void | ) |
Enables the lifetime counter and the counter of the lifetime counter starts counting up.
The user does not need to wait for enable synchronization before entering Deep Sleep. This will occur within one Low-Frequency Clock cycle. But it is recommended to wait for the enabled status before entering Deep sleep ( Cy_SysPm_CpuEnterDeepSleep ).
void Cy_LTC_Disable | ( | void | ) |
Disables the lifetime counter and the counter of the lifetime counter stops counting, but is not cleared to 0.
void Cy_LTC_SetDivider | ( | cy_en_ltc_div_t | divider | ) |
Configures the divide ratio for the pre-selector.
divider | cy_en_ltc_div_t |
cy_en_ltc_div_t Cy_LTC_GetDivider | ( | void | ) |
Returns the divide ratio for the pre-selector value.
void Cy_LTC_SetCounterValue | ( | uint32_t | count | ) |
Configures lifetime counter current value.
count | Lifetime counter current value. |
uint32_t Cy_LTC_GetCounterValue | ( | void | ) |
Returns lifetime counter current value.
void Cy_LTC_SetWakeup | ( | uint32_t | wakeupValue | ) |
Configures the lifetime wakeup value.
The user can change the WAKEUP value without disabling the lifetime counter.
wakeupValue | Lifetime wakeup value. |
uint32_t Cy_LTC_GetWakeup | ( | void | ) |
Returns the lifetime wakeup value.
void Cy_LTC_SetInterrupt | ( | void | ) |
Triggers an interrupt with software.
Can be used to set interrupts for firmware testing.
bool Cy_LTC_GetInterruptStatus | ( | void | ) |
Returns the interrupt status.
void Cy_LTC_ClearInterrupt | ( | void | ) |
Clears the lifetime counter interrupt factor.
void Cy_LTC_SetInterruptMask | ( | bool | enable | ) |
Enables or disables the lifetime counter interrupt handler triggering.
enable | true : to masking interrupt. After masking the interrupt, it is not passed to the CPU. false : to reset masking. After unmasking the interrupt, it is passed to CPU. |
bool Cy_LTC_GetInterruptStatusMasked | ( | void | ) |
Gets Bitwise "AND" between the interrupt request and mask configuration.