PSoC 4 Peripheral Driver Library - Alpha

General Description

Functions

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

Function Documentation

◆ Cy_SysClk_WcoEnable()

__STATIC_INLINE void Cy_SysClk_WcoEnable ( uint32_t  timeoutUs)

Enables the WCO.

Parameters
timeoutUs- WCO startup delay in microseconds. Valid range 0..65535.
Function Usage
/* Scenario: The WCO needs to source the real-time clock.
* Timeout of 2ms is tolerable.
* The WCO pins are configured using the gpio driver.
*/
/* Enable the WCO with a timeout of 2000 microseconds */

◆ Cy_SysClk_WcoDisable()

__STATIC_INLINE void Cy_SysClk_WcoDisable ( void  )

Disables the WCO.

Function Usage
/* Scenario: watchdog counter needs to be sourced by the ILO instead of the WCO. */
/* Disable the ILO */
/* Now switch the watchdog counter clocking to ILO */
/* Disable the WCO */

◆ Cy_SysClk_WcoIsEnabled()

__STATIC_INLINE bool Cy_SysClk_WcoIsEnabled ( void  )

Returns the WCO enable/disable state.

Function Usage
/* Scenario: An external watch crystal oscillator needs to be connected to
* the WCO pins instead of a watch crystal.
* The WCO pins are configured using the gpio driver.
*/
if (!Cy_SysClk_WcoIsEnabled()) /* if not enabled */
{
/* WCO bypassed mode - 32768 kHz square-wave supplied through SRSS_WCO_OUT_PIN pin */
/* Enable the WCO with a zero timeout */
}

◆ 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 watch crystal oscillator needs to be connected to
* the WCO pins instead of a watch crystal.
* The WCO pins are configured using the gpio driver.
*/
if (!Cy_SysClk_WcoIsEnabled()) /* if not enabled */
{
/* WCO bypassed mode - 32768 kHz square-wave supplied through SRSS_WCO_OUT_PIN pin */
/* Enable the WCO with a zero timeout */
}