You are here

External Oscillator for WCO of PSoC® 4/ PRoC™ BLE - KBA200299 | Cypress Semiconductor

Support & Community

External Oscillator for WCO of PSoC® 4/ PRoC™ BLE - KBA200299

Last Updated: September 08, 2016

Can I use an external oscillator for the watch crystal oscillator (WCO) of PSoC 4/PRoC BLE?


Yes, you can use an external oscillator for the WCO.  

Make the following settings in the hardware: 

  1. Connect the external clock source to the XTAL32O pin.
  2. Leave the XTAL32I pad floating. If floating is not desirable, ensure to have an impedance of at least 500 kW between the XTAL32I pad and ground.
  3. Provide an external clock source that toggles from 0 V to a minimum of 1.0 V, or 0 V to a maximum of 1.6 V.
  4. Ensure that the duty cycle of the external clock is between 20 and 80 percent.

To use an external clock in firmware, do the following:

  1. Disable WCO and select ILO for LFCLK in the Low Frequency Clocks tab of the Configure System Clock window in the .cydwr file.
  2. Set the EXT_INPUT_EN (bit 2) bit to ‘1’ in the BLE_BLESS_WCO_CONFIG register in firmware before enabling the WCO.
  3. Start WCO by calling the CySysClkWcoStart(); API.
  4. Select WCO as the LFCLK source by calling the CySysClkSetLfclkSource(CY_SYS_CLK_LFCLK_SRC_WCO); API.
  5. Stop ILO by calling the CySysClkIloStop(); API. 

A sample code for using the external clock source for WCO is given below: 

int main()
/*Enable External Clock*/
/*Start WCO */
/*Select WCO as the clock source*/
/*Stop ILO*/
/* Stack Initialization */

Provide feedback on this article

Browse KB By Product

Browse KB by Type