Functions | |
void | Cy_WDT_Init (void) |
Initializes the Watchdog timer to its default state: More... | |
__STATIC_INLINE void | Cy_WDT_Enable (void) |
Enables watchdog timer reset generation. More... | |
__STATIC_INLINE bool | Cy_WDT_IsEnabled (void) |
Returns the WDT enable/disable state. More... | |
__STATIC_INLINE void | Cy_WDT_Disable (void) |
Disables the WDT reset generation. More... | |
__STATIC_INLINE uint32_t | Cy_WDT_GetCount (void) |
Reads the current WDT counter value. More... | |
void | Cy_WDT_SetMatch (uint32_t match) |
Configures the WDT counter match comparison value. More... | |
__STATIC_INLINE uint32_t | Cy_WDT_GetMatch (void) |
Reads the WDT counter match comparison value. More... | |
void | Cy_WDT_SetIgnoreBits (uint32_t bitsNum) |
Configures the number of the most significant bits of the Watchdog timer that are not checked against the match. More... | |
__STATIC_INLINE uint32_t | Cy_WDT_GetIgnoreBits (void) |
Reads the number of the most significant bits of the Watchdog timer that are not checked against the match. More... | |
__STATIC_INLINE void | Cy_WDT_MaskInterrupt (void) |
After masking interrupts from the WDT, they are not passed to the CPU. More... | |
__STATIC_INLINE void | Cy_WDT_UnmaskInterrupt (void) |
After unmasking interrupts from the WDT, they are passed to CPU. More... | |
__STATIC_INLINE bool | Cy_WDT_GetInterruptStatusMasked (void) |
Returns an interrupt request register masked by an interrupt mask. More... | |
void | Cy_WDT_ClearInterrupt (void) |
Clears the WDT interrupt request which is set as configured by WDT action and limits. | |
__STATIC_INLINE void | Cy_WDT_ClearWatchdog (void) |
Clears ("feeds") the watchdog, to prevent a XRES device reset. More... | |
__STATIC_INLINE void | Cy_WDT_Lock (void) |
Locks out configuration changes to the Watchdog Timer register. More... | |
__STATIC_INLINE void | Cy_WDT_Unlock (void) |
Unlocks the Watchdog Timer configuration register. More... | |
__STATIC_INLINE bool | Cy_WDT_Locked (void) |
Returns the WDT lock state. More... | |
__STATIC_INLINE void | Cy_WDT_SetLowerLimit (uint32_t match) |
Set lower limit for watchdog. More... | |
__STATIC_INLINE void | Cy_WDT_SetUpperLimit (uint32_t match) |
Set upper limit for watchdog. More... | |
__STATIC_INLINE void | Cy_WDT_SetWarnLimit (uint32_t match) |
Set warn limit for watchdog. More... | |
__STATIC_INLINE void | Cy_WDT_SetLowerAction (cy_en_wdt_lower_upper_action_t action) |
Set action taken if this watchdog is serviced before LOWER_LIMIT is reached. More... | |
__STATIC_INLINE void | Cy_WDT_SetUpperAction (cy_en_wdt_lower_upper_action_t action) |
Set action taken if this watchdog is not serviced before UPPER_LIMIT is reached. More... | |
__STATIC_INLINE void | Cy_WDT_SetWarnAction (cy_en_wdt_warn_action_t action) |
Set action taken when the count value reaches WARN_LIMIT. More... | |
__STATIC_INLINE void | Cy_WDT_SetAutoService (cy_en_wdt_enable_t enable) |
Set automatically service when the count value reaches WARN_LIMIT. More... | |
__STATIC_INLINE void | Cy_WDT_SetDeepSleepPause (cy_en_wdt_enable_t enable) |
Set whether the WDT counter runs/pauses when the system is in DEEPSLEEP. More... | |
__STATIC_INLINE void | Cy_WDT_SetDebugRun (cy_en_wdt_enable_t enable) |
Set the debug run value. More... | |
__STATIC_INLINE void | Cy_WDT_SetService (void) |
Set service of the watchdog. More... | |
__STATIC_INLINE void | Cy_WDT_SetCount (uint32_t count) |
Set the WDT counter value. More... | |
__STATIC_INLINE void | Cy_WDT_SetInterrupt (void) |
Triggers an interrupt with software. More... | |
void Cy_WDT_Init | ( | void | ) |
Initializes the Watchdog timer to its default state:
This function clears the WDT interrupt.
For PSOC4 HVMS/PA devices the given default setting of the WDT:
__STATIC_INLINE void Cy_WDT_Enable | ( | void | ) |
Enables watchdog timer reset generation.
__STATIC_INLINE bool Cy_WDT_IsEnabled | ( | void | ) |
Returns the WDT enable/disable state.
__STATIC_INLINE void Cy_WDT_Disable | ( | void | ) |
Disables the WDT reset generation.
__STATIC_INLINE uint32_t Cy_WDT_GetCount | ( | void | ) |
Reads the current WDT counter value.
void Cy_WDT_SetMatch | ( | uint32_t | match | ) |
Configures the WDT counter match comparison value.
match | The valid range is [0-65535]. The value to be used to match against the counter. |
__STATIC_INLINE uint32_t Cy_WDT_GetMatch | ( | void | ) |
Reads the WDT counter match comparison value.
void Cy_WDT_SetIgnoreBits | ( | uint32_t | bitsNum | ) |
Configures the number of the most significant bits of the Watchdog timer that are not checked against the match.
bitsNum | The number of the most significant bits. The valid range is [0-15]. |
The value of bitsNum controls the time-to-reset of the Watchdog timer. This happens after 3 successive matches.
__STATIC_INLINE uint32_t Cy_WDT_GetIgnoreBits | ( | void | ) |
Reads the number of the most significant bits of the Watchdog timer that are not checked against the match.
__STATIC_INLINE void Cy_WDT_MaskInterrupt | ( | void | ) |
After masking interrupts from the WDT, they are not passed to the CPU.
This function does not disable the WDT-reset generation.
__STATIC_INLINE void Cy_WDT_UnmaskInterrupt | ( | void | ) |
After unmasking interrupts from the WDT, they are passed to CPU.
This function does not impact the reset generation.
__STATIC_INLINE bool Cy_WDT_GetInterruptStatusMasked | ( | void | ) |
Returns an interrupt request register masked by an interrupt mask.
Returns the result of the bitwise AND operation between the corresponding interrupt request and mask bits.
__STATIC_INLINE void Cy_WDT_ClearWatchdog | ( | void | ) |
Clears ("feeds") the watchdog, to prevent a XRES device reset.
This function simply call Cy_WDT_ClearInterrupt() function.
__STATIC_INLINE void Cy_WDT_Lock | ( | void | ) |
Locks out configuration changes to the Watchdog Timer register.
After this function is called, the WDT configuration cannot be changed until Cy_WDT_Unlock() is called.
__STATIC_INLINE void Cy_WDT_Unlock | ( | void | ) |
Unlocks the Watchdog Timer configuration register.
The Watchdog timer should be unlocked before:
__STATIC_INLINE bool Cy_WDT_Locked | ( | void | ) |
Returns the WDT lock state.
__STATIC_INLINE void Cy_WDT_SetLowerLimit | ( | uint32_t | match | ) |
Set lower limit for watchdog.
match | - Value to be matched |
__STATIC_INLINE void Cy_WDT_SetUpperLimit | ( | uint32_t | match | ) |
Set upper limit for watchdog.
match | - Value to be matched |
__STATIC_INLINE void Cy_WDT_SetWarnLimit | ( | uint32_t | match | ) |
Set warn limit for watchdog.
match | - Value to be matched |
__STATIC_INLINE void Cy_WDT_SetLowerAction | ( | cy_en_wdt_lower_upper_action_t | action | ) |
Set action taken if this watchdog is serviced before LOWER_LIMIT is reached.
action | cy_en_wdt_lower_upper_action_t |
__STATIC_INLINE void Cy_WDT_SetUpperAction | ( | cy_en_wdt_lower_upper_action_t | action | ) |
Set action taken if this watchdog is not serviced before UPPER_LIMIT is reached.
action | cy_en_wdt_lower_upper_action_t |
__STATIC_INLINE void Cy_WDT_SetWarnAction | ( | cy_en_wdt_warn_action_t | action | ) |
Set action taken when the count value reaches WARN_LIMIT.
action | cy_en_wdt_warn_action_t |
__STATIC_INLINE void Cy_WDT_SetAutoService | ( | cy_en_wdt_enable_t | enable | ) |
Set automatically service when the count value reaches WARN_LIMIT.
This function is used for WARN_LIMIT. This allows creation of a periodic interrupt if this counter is not needed as a watchdog. This configuration is ignored when LOWER_ACTION or when UPPER_ACTION is set to trigger a reset.
enable | cy_en_wdt_enable_t |
__STATIC_INLINE void Cy_WDT_SetDeepSleepPause | ( | cy_en_wdt_enable_t | enable | ) |
Set whether the WDT counter runs/pauses when the system is in DEEPSLEEP.
enable | cy_en_wdt_enable_t |
__STATIC_INLINE void Cy_WDT_SetDebugRun | ( | cy_en_wdt_enable_t | enable | ) |
Set the debug run value.
It needs when using debugger.
enable | cy_en_wdt_enable_t |
__STATIC_INLINE void Cy_WDT_SetService | ( | void | ) |
Set service of the watchdog.
This resets the count value to zero. If WDT is disabled, service will not trigger a LOWER_ACTION and will not clear a preloaded count value.
__STATIC_INLINE void Cy_WDT_SetCount | ( | uint32_t | count | ) |
Set the WDT counter value.
When WDT is disabled and unlocked, the count value can be written for verification and debugging purposes. Software writes are always ignored when the WDT is enabled. Set the WDT counter value may lag the actual count value by up to one Low-Frequency Clock cycle, due to internal synchronization.
__STATIC_INLINE void Cy_WDT_SetInterrupt | ( | void | ) |
Triggers an interrupt with software.
Can be used to set interrupts for firmware testing.