CAT2 Peripheral Driver Library

Functions

__STATIC_INLINE void Cy_SysClk_WcoEnable (uint32_t timeoutUs)
 Enables the WCO. More...
 
__STATIC_INLINE void Cy_SysClk_WcoDisable (void)
 Disables the WCO.
 
__STATIC_INLINE bool Cy_SysClk_WcoIsEnabled (void)
 Returns the WCO enable/disable state.
 
__STATIC_INLINE void Cy_SysClk_WcoBypass (bool bypass)
 Enables/disables external clock input through the WCO input pin. More...
 

Detailed Description

Function Documentation

◆ Cy_SysClk_WcoEnable()

__STATIC_INLINE void Cy_SysClk_WcoEnable ( uint32_t  timeoutUs)

Enables the WCO.

Parameters
timeoutUs- WCO startup delay in microseconds.
Function Usage
/* Scenario: The WCO needs to source the WDC timers.
* Timeout of 500ms is tolerable.
* (Please refer to the datasheet for your device)
* The WCO pins are configured using the gpio driver.
*/
/* Enable the WCO with a timeout of 500000 microseconds */
Cy_SysClk_WcoEnable(CY_SYSCLK_WCO_TIMEOUT_US);

◆ Cy_SysClk_WcoBypass()

__STATIC_INLINE void Cy_SysClk_WcoBypass ( bool  bypass)

Enables/disables external clock input through the WCO input pin.

Parameters
bypass
  • true - external clock input through the WCO input pin (WCO bypass enabled)
  • false - regular WCO operation (bypass disabled)
Function Usage
/* Scenario: An external 32.768 KHz square-wave supplied through wco_out pin.
* The WCO pins are configured using the gpio driver.
*/
/* Configure pins. The actual pin numbers may differ, please refer to the
* device datasheet for the more details.
*/
Cy_GPIO_Pin_FastInit(GPIO_PRT0, 4UL, CY_GPIO_DM_ANALOG, 0UL, HSIOM_SEL_GPIO);
Cy_GPIO_Pin_FastInit(GPIO_PRT0, 5UL, CY_GPIO_DM_ANALOG, 0UL, HSIOM_SEL_GPIO);
/* Disable the WCO */
/* If WCO is not enabled */
{
/* Switch WCO in bypass mode */
/* Enable the WCO with recommended timeout 15us */
}