API Reference | |
Low Power Callback | |
The driver supports SysPm callback for Deep Sleep transition. | |
Functions | |
__STATIC_INLINE void | Cy_LVD_HT_Enable (cy_en_lvd_ht_select_t lvdNum) |
Enables the output of the LVD block when the VDDD voltage crosses the threshold. More... | |
__STATIC_INLINE void | Cy_LVD_HT_Disable (cy_en_lvd_ht_select_t lvdNum) |
Disables a particular LVD. More... | |
__STATIC_INLINE void | Cy_LVD_HT_SetThreshold (cy_en_lvd_ht_select_t lvdNum, cy_en_lvd_ht_tripsel_t threshold) |
Sets a threshold for monitoring the VDDD voltage. More... | |
__STATIC_INLINE cy_en_lvd_ht_status_t | Cy_LVD_HT_GetStatus (cy_en_lvd_ht_select_t lvdNum) |
Returns the status of selected LVD. More... | |
__STATIC_INLINE uint32_t | Cy_LVD_HT_GetInterruptStatus (cy_en_lvd_ht_select_t lvdNum) |
Returns the status of selected LVD's interrupt. More... | |
__STATIC_INLINE void | Cy_LVD_HT_ClearInterrupt (cy_en_lvd_ht_select_t lvdNum) |
Clears LVD interrupt. More... | |
__STATIC_INLINE void | Cy_LVD_HT_SetInterrupt (cy_en_lvd_ht_select_t lvdNum) |
Triggers the device to generate interrupt for LVD. More... | |
__STATIC_INLINE uint32_t | Cy_LVD_HT_GetInterruptMask (cy_en_lvd_ht_select_t lvdNum) |
Returns the mask value of LVD interrupts. More... | |
__STATIC_INLINE void | Cy_LVD_HT_SetInterruptMask (cy_en_lvd_ht_select_t lvdNum) |
Enables LVD interrupts. More... | |
__STATIC_INLINE void | Cy_LVD_HT_ClearInterruptMask (cy_en_lvd_ht_select_t lvdNum) |
Disables LVD interrupts. More... | |
__STATIC_INLINE uint32_t | Cy_LVD_HT_GetInterruptStatusMasked (cy_en_lvd_ht_select_t lvdNum) |
Returns the masked interrupt status which is a bitwise AND between the interrupt status and interrupt mask registers. More... | |
__STATIC_INLINE void | Cy_LVD_HT_SetInterruptConfig (cy_en_lvd_ht_select_t lvdNum, cy_en_lvd_ht_intr_config_t lvdInterruptConfig) |
Sets a configuration for specified LVD interrupt. More... | |
__STATIC_INLINE void | Cy_LVD_HT_DeepSleepEnable (cy_en_lvd_ht_select_t lvdNum) |
Enables selected LVD block during Deep Sleep. More... | |
__STATIC_INLINE void | Cy_LVD_HT_DeepSleepDisable (cy_en_lvd_ht_select_t lvdNum) |
Disables selected LVD block during Deep Sleep. More... | |
__STATIC_INLINE void | Cy_LVD_HT_SetActionConfig (cy_en_lvd_ht_select_t lvdNum, cy_en_lvd_ht_action_config_t lvdActionConfig) |
Sets a action configuration after LVD block reaches threshold. More... | |
__STATIC_INLINE cy_en_lvd_ht_action_config_t | Cy_LVD_HT_GetActionConfig (cy_en_lvd_ht_select_t lvdNum) |
Gets the action configured after LVD reaches threshold. More... | |
__STATIC_INLINE bool | Cy_LVD_HT_IsDeepSleepEnabled (cy_en_lvd_ht_select_t lvdNum) |
Checks if LVD HT is enabled during Deep Sleep or not. More... | |
__STATIC_INLINE void Cy_LVD_HT_Enable | ( | cy_en_lvd_ht_select_t | lvdNum | ) |
Enables the output of the LVD block when the VDDD voltage crosses the threshold.
See the Configuration Considerations section for details.
lvdNum | Selects the LVD, cy_en_lvd_ht_select_t |
__STATIC_INLINE void Cy_LVD_HT_Disable | ( | cy_en_lvd_ht_select_t | lvdNum | ) |
Disables a particular LVD.
A low voltage detection interrupt is disabled.
lvdNum | Selects the LVD, cy_en_lvd_ht_select_t |
__STATIC_INLINE void Cy_LVD_HT_SetThreshold | ( | cy_en_lvd_ht_select_t | lvdNum, |
cy_en_lvd_ht_tripsel_t | threshold | ||
) |
Sets a threshold for monitoring the VDDD voltage.
To prevent propagating a false interrupt, before changing the threshold ensure that the LVD block itself and LVD interrupt are disabled by the Cy_LVD_HT_Disable and Cy_LVD_HT_ClearInterruptMask functions correspondingly.
lvdNum | Selects the LVD, cy_en_lvd_ht_select_t |
threshold | Threshold selection for Low Voltage Detect circuit, cy_en_lvd_ht_tripsel_t. |
__STATIC_INLINE cy_en_lvd_ht_status_t Cy_LVD_HT_GetStatus | ( | cy_en_lvd_ht_select_t | lvdNum | ) |
Returns the status of selected LVD.
SRSS LVD Status Register (PWR_LVD_STATUS).
lvdNum | Selects the LVD, cy_en_lvd_ht_select_t |
__STATIC_INLINE uint32_t Cy_LVD_HT_GetInterruptStatus | ( | cy_en_lvd_ht_select_t | lvdNum | ) |
Returns the status of selected LVD's interrupt.
SRSS Interrupt Register (SRSS_INTR).
lvdNum | Selects the LVD, cy_en_lvd_ht_select_t |
__STATIC_INLINE void Cy_LVD_HT_ClearInterrupt | ( | cy_en_lvd_ht_select_t | lvdNum | ) |
Clears LVD interrupt.
SRSS Interrupt Register (SRSS_INTR).
lvdNum | Selects the LVD, cy_en_lvd_ht_select_t |
__STATIC_INLINE void Cy_LVD_HT_SetInterrupt | ( | cy_en_lvd_ht_select_t | lvdNum | ) |
Triggers the device to generate interrupt for LVD.
SRSS Interrupt Set Register (SRSS_INTR_SET).
lvdNum | Selects the LVD, cy_en_lvd_ht_select_t |
__STATIC_INLINE uint32_t Cy_LVD_HT_GetInterruptMask | ( | cy_en_lvd_ht_select_t | lvdNum | ) |
Returns the mask value of LVD interrupts.
SRSS Interrupt Mask Register (SRSS_INTR_MASK).
lvdNum | Selects the LVD, cy_en_lvd_ht_select_t |
__STATIC_INLINE void Cy_LVD_HT_SetInterruptMask | ( | cy_en_lvd_ht_select_t | lvdNum | ) |
Enables LVD interrupts.
Sets the LVD interrupt mask in the SRSS_INTR_MASK register.
lvdNum | Selects the LVD, cy_en_lvd_ht_select_t |
__STATIC_INLINE void Cy_LVD_HT_ClearInterruptMask | ( | cy_en_lvd_ht_select_t | lvdNum | ) |
Disables LVD interrupts.
Clears the LVD interrupt mask in the SRSS_INTR_MASK register.
lvdNum | Selects the LVD, cy_en_lvd_ht_select_t |
__STATIC_INLINE uint32_t Cy_LVD_HT_GetInterruptStatusMasked | ( | cy_en_lvd_ht_select_t | lvdNum | ) |
Returns the masked interrupt status which is a bitwise AND between the interrupt status and interrupt mask registers.
SRSS Interrupt Masked Register (SRSS_INTR_MASKED).
lvdNum | Selects the LVD, cy_en_lvd_ht_select_t |
__STATIC_INLINE void Cy_LVD_HT_SetInterruptConfig | ( | cy_en_lvd_ht_select_t | lvdNum, |
cy_en_lvd_ht_intr_config_t | lvdInterruptConfig | ||
) |
Sets a configuration for specified LVD interrupt.
HVLVD Configuration Register (PWR_LVD_CTL or PWR_LVD_CTL2).
lvdNum | Selects the LVD, cy_en_lvd_ht_select_t |
lvdInterruptConfig | cy_en_lvd_ht_intr_config_t. |
__STATIC_INLINE void Cy_LVD_HT_DeepSleepEnable | ( | cy_en_lvd_ht_select_t | lvdNum | ) |
Enables selected LVD block during Deep Sleep.
lvdNum | Selects the LVD, cy_en_lvd_ht_select_t |
__STATIC_INLINE void Cy_LVD_HT_DeepSleepDisable | ( | cy_en_lvd_ht_select_t | lvdNum | ) |
Disables selected LVD block during Deep Sleep.
lvdNum | Selects the LVD, cy_en_lvd_ht_select_t |
__STATIC_INLINE void Cy_LVD_HT_SetActionConfig | ( | cy_en_lvd_ht_select_t | lvdNum, |
cy_en_lvd_ht_action_config_t | lvdActionConfig | ||
) |
Sets a action configuration after LVD block reaches threshold.
lvdNum | Selects the LVD, cy_en_lvd_ht_select_t |
lvdActionConfig | cy_en_lvd_ht_action_config_t. |
__STATIC_INLINE cy_en_lvd_ht_action_config_t Cy_LVD_HT_GetActionConfig | ( | cy_en_lvd_ht_select_t | lvdNum | ) |
Gets the action configured after LVD reaches threshold.
lvdNum | Selects the LVD, cy_en_lvd_ht_select_t |
__STATIC_INLINE bool Cy_LVD_HT_IsDeepSleepEnabled | ( | cy_en_lvd_ht_select_t | lvdNum | ) |
Checks if LVD HT is enabled during Deep Sleep or not.
lvdNum | Selects the LVD, cy_en_lvd_ht_select_t |