Functions | |
cy_en_mcwdt_status_t | Cy_MCWDT_Init (MCWDT_STRUCT_Type *base, cy_stc_mcwdt_config_t const *config) |
Initializes the MCWDT block. More... | |
void | Cy_MCWDT_DeInit (MCWDT_STRUCT_Type *base) |
De-initializes the MCWDT block, returns register values to their default state. More... | |
__STATIC_INLINE void | Cy_MCWDT_Enable (MCWDT_STRUCT_Type *base, uint32_t counters, uint16_t waitUs) |
Enables all specified counters. More... | |
__STATIC_INLINE void | Cy_MCWDT_Disable (MCWDT_STRUCT_Type *base, uint32_t counters, uint16_t waitUs) |
Disables all specified counters. More... | |
__STATIC_INLINE uint32_t | Cy_MCWDT_GetEnabledStatus (MCWDT_STRUCT_Type const *base, cy_en_mcwdtctr_t counter) |
Reports the enabled status of the specified counter. More... | |
__STATIC_INLINE void | Cy_MCWDT_Lock (MCWDT_STRUCT_Type *base) |
Locks out configuration changes to all MCWDT registers. More... | |
__STATIC_INLINE void | Cy_MCWDT_Unlock (MCWDT_STRUCT_Type *base) |
Unlocks the MCWDT configuration registers. More... | |
__STATIC_INLINE uint32_t | Cy_MCWDT_GetLockedStatus (MCWDT_STRUCT_Type const *base) |
Reports the locked/unlocked state of the MCWDT. More... | |
__STATIC_INLINE void | Cy_MCWDT_SetMode (MCWDT_STRUCT_Type *base, cy_en_mcwdtctr_t counter, cy_en_mcwdtmode_t mode) |
Sets the mode of the specified counter. More... | |
__STATIC_INLINE cy_en_mcwdtmode_t | Cy_MCWDT_GetMode (MCWDT_STRUCT_Type const *base, cy_en_mcwdtctr_t counter) |
Reports the mode of the specified counter. More... | |
__STATIC_INLINE void | Cy_MCWDT_SetClearOnMatch (MCWDT_STRUCT_Type *base, cy_en_mcwdtctr_t counter, uint32_t enable) |
Sets the Clear on match option for the specified counter. More... | |
__STATIC_INLINE uint32_t | Cy_MCWDT_GetClearOnMatch (MCWDT_STRUCT_Type const *base, cy_en_mcwdtctr_t counter) |
Reports the Clear on match setting for the specified counter. More... | |
__STATIC_INLINE void | Cy_MCWDT_SetCascade (MCWDT_STRUCT_Type *base, cy_en_mcwdtcascade_t cascade) |
Sets all the counter cascade options. More... | |
__STATIC_INLINE cy_en_mcwdtcascade_t | Cy_MCWDT_GetCascade (MCWDT_STRUCT_Type const *base) |
Reports all the counter cascade option settings. More... | |
__STATIC_INLINE void | Cy_MCWDT_SetMatch (MCWDT_STRUCT_Type *base, cy_en_mcwdtctr_t counter, uint32_t match, uint16_t waitUs) |
Sets the match comparison value for the specified counter (0 or 1). More... | |
__STATIC_INLINE uint32_t | Cy_MCWDT_GetMatch (MCWDT_STRUCT_Type const *base, cy_en_mcwdtctr_t counter) |
Reports the match comparison value for the specified counter (0 or 1). More... | |
uint32_t | Cy_MCWDT_GetCountCascaded (MCWDT_STRUCT_Type const *base) |
Reports the current value of combined C1-C0 cascaded counters. More... | |
__STATIC_INLINE void | Cy_MCWDT_SetToggleBit (MCWDT_STRUCT_Type *base, uint32_t bit) |
Sets a bit in Counter 2 to monitor for a toggle. More... | |
__STATIC_INLINE uint32_t | Cy_MCWDT_GetToggleBit (MCWDT_STRUCT_Type const *base) |
Reports which bit in Counter 2 is monitored for a toggle. More... | |
__STATIC_INLINE uint32_t | Cy_MCWDT_GetCount (MCWDT_STRUCT_Type const *base, cy_en_mcwdtctr_t counter) |
Reports the current counter value of the specified counter. More... | |
__STATIC_INLINE void | Cy_MCWDT_ResetCounters (MCWDT_STRUCT_Type *base, uint32_t counters, uint16_t waitUs) |
Resets all specified counters. More... | |
__STATIC_INLINE uint32_t | Cy_MCWDT_GetInterruptStatus (MCWDT_STRUCT_Type const *base) |
Reports the state of all MCWDT interrupts. More... | |
__STATIC_INLINE void | Cy_MCWDT_ClearInterrupt (MCWDT_STRUCT_Type *base, uint32_t counters) |
Clears all specified MCWDT interrupts. More... | |
__STATIC_INLINE void | Cy_MCWDT_SetInterrupt (MCWDT_STRUCT_Type *base, uint32_t counters) |
Sets MCWDT interrupt sources in the interrupt request register. More... | |
__STATIC_INLINE uint32_t | Cy_MCWDT_GetInterruptMask (MCWDT_STRUCT_Type const *base) |
Returns the CWDT interrupt mask register. More... | |
__STATIC_INLINE void | Cy_MCWDT_SetInterruptMask (MCWDT_STRUCT_Type *base, uint32_t counters) |
Writes MCWDT interrupt mask register. More... | |
__STATIC_INLINE uint32_t | Cy_MCWDT_GetInterruptStatusMasked (MCWDT_STRUCT_Type const *base) |
Returns the MCWDT interrupt masked request register. More... | |
__STATIC_INLINE uint32_t | Cy_MCWDT_GetLowerLimit (MCWDT_STRUCT_Type const *base, cy_en_mcwdtlowerlimit_t counter) |
Reports the Lower Limit value of the specified counter. More... | |
__STATIC_INLINE void | Cy_MCWDT_SetLowerLimit (MCWDT_STRUCT_Type *base, cy_en_mcwdtlowerlimit_t counter, uint32_t lowerLimit, uint16_t waitUs) |
Sets the lower limit value for the specified counter (0 or 1). More... | |
__STATIC_INLINE cy_en_mcwdtlowerlimitmode_t | Cy_MCWDT_GetLowerLimitMode (MCWDT_STRUCT_Type const *base, cy_en_mcwdtlowerlimit_t counter) |
Reports the lower limit mode of the specified counter. More... | |
__STATIC_INLINE void | Cy_MCWDT_SetLowerLimitMode (MCWDT_STRUCT_Type *base, cy_en_mcwdtlowerlimit_t counter, cy_en_mcwdtlowerlimitmode_t mode) |
Sets the lower limit mode option for the specified counter. More... | |
__STATIC_INLINE uint32_t | Cy_MCWDT_GetLowerLimitCascaded (MCWDT_STRUCT_Type const *base) |
Gets lower limit registers cascaded value. More... | |
__STATIC_INLINE void | Cy_MCWDT_SetCascadeCarryOutRollOver (MCWDT_STRUCT_Type *base, cy_en_mcwdtcascade_t counter, bool carryoutconfig) |
Enables the Rollover mode for carryout. More... | |
__STATIC_INLINE bool | Cy_MCWDT_GetCascadeCarryOutRollOver (MCWDT_STRUCT_Type const *base, cy_en_mcwdtcascade_t counter) |
Checks if Rollover mode enabled for carryout or not. More... | |
__STATIC_INLINE void | Cy_MCWDT_SetCascadeMatchCombined (MCWDT_STRUCT_Type *base, cy_en_mcwdtcascade_t counter, bool matchconfig) |
Sets the match to combined cascade counters. More... | |
__STATIC_INLINE bool | Cy_MCWDT_GetCascadeMatchCombined (MCWDT_STRUCT_Type const *base, cy_en_mcwdtcascade_t counter) |
Reports if match is enabled with combined cascade counters or not. More... | |
void | Cy_MCWDT_CpuSelectForDpSlpPauseAction (MCWDT_Type *base, cy_en_mcwdt_select_core_t core) |
Select deep sleep of which core for pausing this counter. More... | |
void | Cy_MCWDT_SetLowerAction (MCWDT_Type *base, cy_en_mcwdtctr_t counter, cy_en_mcwdt_lower_upper_action_t action) |
Sets the lower limit action of the specified counter. More... | |
void | Cy_MCWDT_SetUpperAction (MCWDT_Type *base, cy_en_mcwdtctr_t counter, cy_en_mcwdt_lower_upper_action_t action) |
Sets the upper limit action of the specified counter. More... | |
void | Cy_MCWDT_SetWarnAction (MCWDT_Type *base, cy_en_mcwdtctr_t counter, cy_en_mcwdt_warn_action_t action) |
Sets the warn limit action of the specified counter. More... | |
void | Cy_MCWDT_SetSubCounter2Action (MCWDT_Type *base, cy_en_mcwdt_cnt2_action_t action) |
Sets the counter 2 action of the specified counter. More... | |
cy_en_mcwdt_lower_upper_action_t | Cy_MCWDT_GetLowerAction (MCWDT_Type *base, cy_en_mcwdtctr_t counter) |
Reports the lower limit action type of the specified counter. More... | |
cy_en_mcwdt_lower_upper_action_t | Cy_MCWDT_GetUpperAction (MCWDT_Type *base, cy_en_mcwdtctr_t counter) |
Reports the upper limit action type of the specified counter. More... | |
cy_en_mcwdt_warn_action_t | Cy_MCWDT_GetWarnAction (MCWDT_Type *base, cy_en_mcwdtctr_t counter) |
Reports the warn limit action type of the specified counter. More... | |
cy_en_mcwdt_cnt2_action_t | Cy_MCWDT_GetSubCounter2Action (MCWDT_Type *base) |
Reports the counter 2 action type of the specified counter. More... | |
void | Cy_MCWDT_SetAutoService (MCWDT_Type *base, cy_en_mcwdtctr_t counter, uint32_t enable) |
Sets the Auto service option for the specified counter. More... | |
uint32_t | Cy_MCWDT_GetAutoService (MCWDT_Type const *base, cy_en_mcwdtctr_t counter) |
Reports the Auto service setting for the specified counter. More... | |
uint32_t | Cy_MCWDT_GetSleepDeepPause (MCWDT_Type const *base, cy_en_mcwdtctr_t counter) |
Reports the Sleep deep pause setting for the specified counter. More... | |
void | Cy_MCWDT_SetSleepDeepPause (MCWDT_Type *base, cy_en_mcwdtctr_t counter, uint32_t enable) |
Sets the Sleep deep pause option for the specified counter. More... | |
void | Cy_MCWDT_SetDebugRun (MCWDT_Type *base, cy_en_mcwdtctr_t counter, uint32_t enable) |
Sets the Debug run option for the specified counter. More... | |
uint32_t | Cy_MCWDT_GetDebugRun (MCWDT_Type const *base, cy_en_mcwdtctr_t counter) |
Reports the Debug run setting for the specified counter. More... | |
void | Cy_MCWDT_SetLowerLimit (MCWDT_Type *base, cy_en_mcwdtctr_t counter, uint16_t limit, uint16_t waitUs) |
Sets the lower limit value for the specified counter (0 or 1). More... | |
void | Cy_MCWDT_SetUpperLimit (MCWDT_Type *base, cy_en_mcwdtctr_t counter, uint16_t limit, uint16_t waitUs) |
Sets the upper limit value for the specified counter (0 or 1). More... | |
void | Cy_MCWDT_SetWarnLimit (MCWDT_Type *base, cy_en_mcwdtctr_t counter, uint16_t limit, uint16_t waitUs) |
Sets the warn limit value for the specified counter (0 or 1). More... | |
uint16_t | Cy_MCWDT_GetUpperLimit (MCWDT_Type *base, cy_en_mcwdtctr_t counter) |
Reports the upper limit comparison value for the specified counter (0 or 1). More... | |
uint16_t | Cy_MCWDT_GetWarnLimit (MCWDT_Type *base, cy_en_mcwdtctr_t counter) |
Reports the warn limit comparison value for the specified counter (0 or 1). More... | |
void | Cy_MCWDT_WaitForCounterReset (MCWDT_Type *base, cy_en_mcwdtctr_t counter) |
wait completion of counter reset. More... | |
void | Cy_MCWDT_ClearWatchdog (MCWDT_Type *base, uint32_t counters) |
Clears the MC watchdog counter, to prevent a XRES device reset or fault. More... | |
uint16_t | Cy_MCWDT_GetLowerLimit (MCWDT_Type *base, cy_en_mcwdtctr_t counter) |
Reports the lower limit comparison value for the specified counter (0 or 1). More... | |
cy_en_mcwdt_status_t Cy_MCWDT_Init | ( | MCWDT_STRUCT_Type * | base, |
cy_stc_mcwdt_config_t const * | config | ||
) |
Initializes the MCWDT block.
base | The base pointer to a structure that describes the registers. |
config | The pointer to a structure that contains component configuration data. |
void Cy_MCWDT_DeInit | ( | MCWDT_STRUCT_Type * | base | ) |
De-initializes the MCWDT block, returns register values to their default state.
base | The base pointer to a structure that describes the registers. |
__STATIC_INLINE void Cy_MCWDT_Enable | ( | MCWDT_STRUCT_Type * | base, |
uint32_t | counters, | ||
uint16_t | waitUs | ||
) |
Enables all specified counters.
base | The base pointer to a structure that describes registers. |
counters | OR of all counters to enable. See the CY_MCWDT_CTR0, CY_MCWDT_CTR1, and CY_MCWDT_CTR2 macros. |
waitUs | The function waits for some delay in microseconds before returning, because the counter begins counting after two lf_clk cycles pass. The recommended value is 93 us. |
__STATIC_INLINE void Cy_MCWDT_Disable | ( | MCWDT_STRUCT_Type * | base, |
uint32_t | counters, | ||
uint16_t | waitUs | ||
) |
Disables all specified counters.
base | The base pointer to a structure describing registers. |
counters | OR of all counters to disable. See the CY_MCWDT_CTR0, CY_MCWDT_CTR1, and CY_MCWDT_CTR2 macros. |
waitUs | The function waits for some delay in microseconds before returning, because the counter stops counting after two lf_clk cycles pass. The recommended value is 93 us. |
__STATIC_INLINE uint32_t Cy_MCWDT_GetEnabledStatus | ( | MCWDT_STRUCT_Type const * | base, |
cy_en_mcwdtctr_t | counter | ||
) |
Reports the enabled status of the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the MCWDT counter. The valid range is [0-2]. |
__STATIC_INLINE void Cy_MCWDT_Lock | ( | MCWDT_STRUCT_Type * | base | ) |
Locks out configuration changes to all MCWDT registers.
base | The base pointer to a structure that describes registers. |
__STATIC_INLINE void Cy_MCWDT_Unlock | ( | MCWDT_STRUCT_Type * | base | ) |
Unlocks the MCWDT configuration registers.
base | The base pointer to a structure that describes registers. |
__STATIC_INLINE uint32_t Cy_MCWDT_GetLockedStatus | ( | MCWDT_STRUCT_Type const * | base | ) |
Reports the locked/unlocked state of the MCWDT.
base | The base pointer to a structure that describes registers. |
__STATIC_INLINE void Cy_MCWDT_SetMode | ( | MCWDT_STRUCT_Type * | base, |
cy_en_mcwdtctr_t | counter, | ||
cy_en_mcwdtmode_t | mode | ||
) |
Sets the mode of the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-2]. |
mode | The mode of operation for the counter. See enum typedef cy_en_mcwdtmode_t. |
__STATIC_INLINE cy_en_mcwdtmode_t Cy_MCWDT_GetMode | ( | MCWDT_STRUCT_Type const * | base, |
cy_en_mcwdtctr_t | counter | ||
) |
Reports the mode of the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-2]. |
__STATIC_INLINE void Cy_MCWDT_SetClearOnMatch | ( | MCWDT_STRUCT_Type * | base, |
cy_en_mcwdtctr_t | counter, | ||
uint32_t | enable | ||
) |
Sets the Clear on match option for the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |
enable | Set 0 to disable; 1 to enable. |
__STATIC_INLINE uint32_t Cy_MCWDT_GetClearOnMatch | ( | MCWDT_STRUCT_Type const * | base, |
cy_en_mcwdtctr_t | counter | ||
) |
Reports the Clear on match setting for the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |
__STATIC_INLINE void Cy_MCWDT_SetCascade | ( | MCWDT_STRUCT_Type * | base, |
cy_en_mcwdtcascade_t | cascade | ||
) |
Sets all the counter cascade options.
base | The base pointer to a structure that describes registers. |
cascade | Sets or clears each of the cascade options. |
__STATIC_INLINE cy_en_mcwdtcascade_t Cy_MCWDT_GetCascade | ( | MCWDT_STRUCT_Type const * | base | ) |
Reports all the counter cascade option settings.
base | The base pointer to a structure that describes registers. |
__STATIC_INLINE void Cy_MCWDT_SetMatch | ( | MCWDT_STRUCT_Type * | base, |
cy_en_mcwdtctr_t | counter, | ||
uint32_t | match, | ||
uint16_t | waitUs | ||
) |
Sets the match comparison value for the specified counter (0 or 1).
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |
match | The value to match against the counter. The valid range is [0-65535] for c0ClearOnMatch (or c1ClearOnMatch) = 0 and [1-65535] for c0ClearOnMatch (or c1ClearOnMatch) = 1. |
waitUs | The function waits for some delay in microseconds before returning, because the match affects after two lf_clk cycles pass. The recommended value is 93 us. |
__STATIC_INLINE uint32_t Cy_MCWDT_GetMatch | ( | MCWDT_STRUCT_Type const * | base, |
cy_en_mcwdtctr_t | counter | ||
) |
Reports the match comparison value for the specified counter (0 or 1).
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |
uint32_t Cy_MCWDT_GetCountCascaded | ( | MCWDT_STRUCT_Type const * | base | ) |
Reports the current value of combined C1-C0 cascaded counters.
base | The base pointer to a structure that describes the registers. |
__STATIC_INLINE void Cy_MCWDT_SetToggleBit | ( | MCWDT_STRUCT_Type * | base, |
uint32_t | bit | ||
) |
Sets a bit in Counter 2 to monitor for a toggle.
base | The base pointer to a structure that describes registers. |
bit | The Counter 2 bit is set to monitor for a toggle. The valid range [0-31]. |
__STATIC_INLINE uint32_t Cy_MCWDT_GetToggleBit | ( | MCWDT_STRUCT_Type const * | base | ) |
Reports which bit in Counter 2 is monitored for a toggle.
base | The base pointer to a structure that describes registers. |
__STATIC_INLINE uint32_t Cy_MCWDT_GetCount | ( | MCWDT_STRUCT_Type const * | base, |
cy_en_mcwdtctr_t | counter | ||
) |
Reports the current counter value of the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-2]. |
__STATIC_INLINE void Cy_MCWDT_ResetCounters | ( | MCWDT_STRUCT_Type * | base, |
uint32_t | counters, | ||
uint16_t | waitUs | ||
) |
Resets all specified counters.
base | The base pointer to a structure that describes registers. |
counters | OR of all counters to reset. See the CY_MCWDT_CTR0, CY_MCWDT_CTR1, and CY_MCWDT_CTR2 macros. |
waitUs | The function waits for some delay in microseconds before returning, because a reset occurs after one lf_clk cycle passes. The recommended value is 62 us. |
__STATIC_INLINE uint32_t Cy_MCWDT_GetInterruptStatus | ( | MCWDT_STRUCT_Type const * | base | ) |
Reports the state of all MCWDT interrupts.
base | The base pointer to a structure that describes registers. |
__STATIC_INLINE void Cy_MCWDT_ClearInterrupt | ( | MCWDT_STRUCT_Type * | base, |
uint32_t | counters | ||
) |
Clears all specified MCWDT interrupts.
All the WDT interrupts must be cleared by the firmware; otherwise interrupts are generated continuously.
base | The base pointer to a structure describes registers. |
counters | OR of all interrupt sources to clear. See the CY_MCWDT_CTR0, CY_MCWDT_CTR1, and CY_MCWDT_CTR2 macros. |
__STATIC_INLINE void Cy_MCWDT_SetInterrupt | ( | MCWDT_STRUCT_Type * | base, |
uint32_t | counters | ||
) |
Sets MCWDT interrupt sources in the interrupt request register.
base | The base pointer to a structure that describes registers. |
counters | OR of all interrupt sources to set. See the CY_MCWDT_CTR0, CY_MCWDT_CTR1, and CY_MCWDT_CTR2 macros. |
__STATIC_INLINE uint32_t Cy_MCWDT_GetInterruptMask | ( | MCWDT_STRUCT_Type const * | base | ) |
Returns the CWDT interrupt mask register.
This register specifies which bits from the MCWDT interrupt request register will trigger an interrupt event.
base | The base pointer to a structure that describes registers. |
__STATIC_INLINE void Cy_MCWDT_SetInterruptMask | ( | MCWDT_STRUCT_Type * | base, |
uint32_t | counters | ||
) |
Writes MCWDT interrupt mask register.
This register configures which bits from MCWDT interrupt request register will trigger an interrupt event.
base | The base pointer to a structure that describes registers. |
counters | OR of all interrupt masks to set. See CY_MCWDT_CTR0, CY_MCWDT_CTR1, and CY_MCWDT_CTR2 macros. |
__STATIC_INLINE uint32_t Cy_MCWDT_GetInterruptStatusMasked | ( | MCWDT_STRUCT_Type const * | base | ) |
Returns the MCWDT interrupt masked request register.
This register contains the logical AND of corresponding bits from the MCWDT interrupt request and mask registers. In the interrupt service routine, this function identifies which of the enabled MCWDT interrupt sources caused an interrupt event.
base | The base pointer to a structure that describes registers. |
__STATIC_INLINE uint32_t Cy_MCWDT_GetLowerLimit | ( | MCWDT_STRUCT_Type const * | base, |
cy_en_mcwdtlowerlimit_t | counter | ||
) |
Reports the Lower Limit value of the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |
__STATIC_INLINE void Cy_MCWDT_SetLowerLimit | ( | MCWDT_STRUCT_Type * | base, |
cy_en_mcwdtlowerlimit_t | counter, | ||
uint32_t | lowerLimit, | ||
uint16_t | waitUs | ||
) |
Sets the lower limit value for the specified counter (0 or 1).
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |
lowerLimit | The value to be written in the lower limit register The valid range is [0-65535] for c0 and [1-65535] for c1. |
waitUs | The function waits for some delay in microseconds before returning, because the lower limit register write affects after two lf_clk cycles pass. The recommended value is 93 us. |
__STATIC_INLINE cy_en_mcwdtlowerlimitmode_t Cy_MCWDT_GetLowerLimitMode | ( | MCWDT_STRUCT_Type const * | base, |
cy_en_mcwdtlowerlimit_t | counter | ||
) |
Reports the lower limit mode of the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |
__STATIC_INLINE void Cy_MCWDT_SetLowerLimitMode | ( | MCWDT_STRUCT_Type * | base, |
cy_en_mcwdtlowerlimit_t | counter, | ||
cy_en_mcwdtlowerlimitmode_t | mode | ||
) |
Sets the lower limit mode option for the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |
mode | Set 0 - Do nothing, 1 - Assert WDT_INTx, 2 - Assert WDT Reset |
__STATIC_INLINE uint32_t Cy_MCWDT_GetLowerLimitCascaded | ( | MCWDT_STRUCT_Type const * | base | ) |
Gets lower limit registers cascaded value.
base | The base pointer to a structure that describes registers. |
__STATIC_INLINE void Cy_MCWDT_SetCascadeCarryOutRollOver | ( | MCWDT_STRUCT_Type * | base, |
cy_en_mcwdtcascade_t | counter, | ||
bool | carryoutconfig | ||
) |
Enables the Rollover mode for carryout.
base | The base pointer to a structure that describes registers. |
counter | The cascaded counter type. The valid cascaded type is either C0C1 or C1C2. |
carryoutconfig | For CY_MCWDT_CASCADE_C0C1: FALSE: carry out on counter 0 match TRUE: carry out on counter 0 rollover. For CY_MCWDT_CASCADE_C1C2: FALSE: carry out on counter 1 match TRUE: carry out on counter 1 rollover. |
__STATIC_INLINE bool Cy_MCWDT_GetCascadeCarryOutRollOver | ( | MCWDT_STRUCT_Type const * | base, |
cy_en_mcwdtcascade_t | counter | ||
) |
Checks if Rollover mode enabled for carryout or not.
base | The base pointer to a structure that describes registers. |
counter | The cascaded counter type. The valid cascaded type is either C0C1 or C1C2. |
__STATIC_INLINE void Cy_MCWDT_SetCascadeMatchCombined | ( | MCWDT_STRUCT_Type * | base, |
cy_en_mcwdtcascade_t | counter, | ||
bool | matchconfig | ||
) |
Sets the match to combined cascade counters.
base | The base pointer to a structure that describes registers. |
counter | The cascaded counter type. The valid cascaded type is either C0C1 or C1C2. |
matchconfig | For CY_MCWDT_CASCADE_C0C1: FALSE: Match based on counter 1 alone TRUE: Match based on counter 1 and counter 0 matching simultaneously For CY_MCWDT_CASCADE_C1C2: FALSE: Match based on counter 2 alone TRUE: Match based on counter 2 and counter 1 matching simultaneously |
__STATIC_INLINE bool Cy_MCWDT_GetCascadeMatchCombined | ( | MCWDT_STRUCT_Type const * | base, |
cy_en_mcwdtcascade_t | counter | ||
) |
Reports if match is enabled with combined cascade counters or not.
base | The base pointer to a structure that describes registers. |
counter | The cascaded counter type. The valid cascaded type is either C0C1 or C1C2. |
void Cy_MCWDT_CpuSelectForDpSlpPauseAction | ( | MCWDT_Type * | base, |
cy_en_mcwdt_select_core_t | core | ||
) |
Select deep sleep of which core for pausing this counter.
base | The base pointer to a structure that describes registers. |
core | The selected core. Deep sleep of the core pause this counter. |
void Cy_MCWDT_SetLowerAction | ( | MCWDT_Type * | base, |
cy_en_mcwdtctr_t | counter, | ||
cy_en_mcwdt_lower_upper_action_t | action | ||
) |
Sets the lower limit action of the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |
action | The action of operation for the counter. See enum typedef cy_en_mcwdt_lower_upper_action_t. |
void Cy_MCWDT_SetUpperAction | ( | MCWDT_Type * | base, |
cy_en_mcwdtctr_t | counter, | ||
cy_en_mcwdt_lower_upper_action_t | action | ||
) |
Sets the upper limit action of the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |
action | The action of operation for the counter. See enum typedef cy_en_mcwdt_lower_upper_action_t. |
void Cy_MCWDT_SetWarnAction | ( | MCWDT_Type * | base, |
cy_en_mcwdtctr_t | counter, | ||
cy_en_mcwdt_warn_action_t | action | ||
) |
Sets the warn limit action of the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |
action | The action of operation for the counter. See enum typedef cy_en_mcwdt_warn_action_t. |
void Cy_MCWDT_SetSubCounter2Action | ( | MCWDT_Type * | base, |
cy_en_mcwdt_cnt2_action_t | action | ||
) |
Sets the counter 2 action of the specified counter.
base | The base pointer to a structure that describes registers. |
action | The action of operation for the counter. See enum typedef cy_en_mcwdt_cnt2_action_t. |
cy_en_mcwdt_lower_upper_action_t Cy_MCWDT_GetLowerAction | ( | MCWDT_Type * | base, |
cy_en_mcwdtctr_t | counter | ||
) |
Reports the lower limit action type of the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |
cy_en_mcwdt_lower_upper_action_t Cy_MCWDT_GetUpperAction | ( | MCWDT_Type * | base, |
cy_en_mcwdtctr_t | counter | ||
) |
Reports the upper limit action type of the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |
cy_en_mcwdt_warn_action_t Cy_MCWDT_GetWarnAction | ( | MCWDT_Type * | base, |
cy_en_mcwdtctr_t | counter | ||
) |
Reports the warn limit action type of the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |
cy_en_mcwdt_cnt2_action_t Cy_MCWDT_GetSubCounter2Action | ( | MCWDT_Type * | base | ) |
Reports the counter 2 action type of the specified counter.
base | The base pointer to a structure that describes registers. |
void Cy_MCWDT_SetAutoService | ( | MCWDT_Type * | base, |
cy_en_mcwdtctr_t | counter, | ||
uint32_t | enable | ||
) |
Sets the Auto service option for the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |
enable | Set 0 to disable; 1 to enable. |
uint32_t Cy_MCWDT_GetAutoService | ( | MCWDT_Type const * | base, |
cy_en_mcwdtctr_t | counter | ||
) |
Reports the Auto service setting for the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |
uint32_t Cy_MCWDT_GetSleepDeepPause | ( | MCWDT_Type const * | base, |
cy_en_mcwdtctr_t | counter | ||
) |
Reports the Sleep deep pause setting for the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-2]. |
void Cy_MCWDT_SetSleepDeepPause | ( | MCWDT_Type * | base, |
cy_en_mcwdtctr_t | counter, | ||
uint32_t | enable | ||
) |
Sets the Sleep deep pause option for the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-2]. |
enable | Set 0 to disable; 1 to enable. |
void Cy_MCWDT_SetDebugRun | ( | MCWDT_Type * | base, |
cy_en_mcwdtctr_t | counter, | ||
uint32_t | enable | ||
) |
Sets the Debug run option for the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-2]. |
enable | Set 0 to disable; 1 to enable. |
uint32_t Cy_MCWDT_GetDebugRun | ( | MCWDT_Type const * | base, |
cy_en_mcwdtctr_t | counter | ||
) |
Reports the Debug run setting for the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-2]. |
void Cy_MCWDT_SetLowerLimit | ( | MCWDT_Type * | base, |
cy_en_mcwdtctr_t | counter, | ||
uint16_t | limit, | ||
uint16_t | waitUs | ||
) |
Sets the lower limit value for the specified counter (0 or 1).
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |
limit | The value to lower limit against the counter. The valid range is [0-65535] when Auto service is disabled and [1-65535] when Auto service enabled. |
waitUs | The function waits for some delay in microseconds before returning, because the match affects after two lf_clk cycles pass. The recommended value is 93 us. |
void Cy_MCWDT_SetUpperLimit | ( | MCWDT_Type * | base, |
cy_en_mcwdtctr_t | counter, | ||
uint16_t | limit, | ||
uint16_t | waitUs | ||
) |
Sets the upper limit value for the specified counter (0 or 1).
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |
limit | The value to upper limit against the counter. The valid range is [0-65535] when Auto service is disabled and [1-65535] when Auto service enabled. |
waitUs | The function waits for some delay in microseconds before returning, because the match affects after two lf_clk cycles pass. The recommended value is 93 us. |
void Cy_MCWDT_SetWarnLimit | ( | MCWDT_Type * | base, |
cy_en_mcwdtctr_t | counter, | ||
uint16_t | limit, | ||
uint16_t | waitUs | ||
) |
Sets the warn limit value for the specified counter (0 or 1).
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |
limit | The value to warn limit against the counter. The valid range is [0-65535] when Auto service is disabled and [1-65535] when Auto service enabled. |
waitUs | The function waits for some delay in microseconds before returning, because the match affects after two lf_clk cycles pass. The recommended value is 93 us. |
uint16_t Cy_MCWDT_GetUpperLimit | ( | MCWDT_Type * | base, |
cy_en_mcwdtctr_t | counter | ||
) |
Reports the upper limit comparison value for the specified counter (0 or 1).
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |
uint16_t Cy_MCWDT_GetWarnLimit | ( | MCWDT_Type * | base, |
cy_en_mcwdtctr_t | counter | ||
) |
Reports the warn limit comparison value for the specified counter (0 or 1).
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |
void Cy_MCWDT_WaitForCounterReset | ( | MCWDT_Type * | base, |
cy_en_mcwdtctr_t | counter | ||
) |
wait completion of counter reset.
base | The base pointer to a structure that describes registers. |
counter | The number of the MCWDT counter. The valid range is [0-1]. |
void Cy_MCWDT_ClearWatchdog | ( | MCWDT_Type * | base, |
uint32_t | counters | ||
) |
Clears the MC watchdog counter, to prevent a XRES device reset or fault.
base | The base pointer to a structure that describes the registers. |
counters | OR of all counters to clear watchdog. See the CY_MCWDT_CTR0, CY_MCWDT_CTR1, and CY_MCWDT_CTR2 macros. |
uint16_t Cy_MCWDT_GetLowerLimit | ( | MCWDT_Type * | base, |
cy_en_mcwdtctr_t | counter | ||
) |
Reports the lower limit comparison value for the specified counter (0 or 1).
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. The valid range is [0-1]. |