Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

New Contributor

Hi all,

I am using a PSOC5 Cy8C5888AXI for a project and have encountered some problems regarding clocks with an external oscillator and with measuring the duty-cycle of a pwm signal.

For the oscillator im using an HC49US8.000MABJ-UB 8MHz crystal unit. I checked XTAL in the clock settings and entered the frequency, accuracy and the capacities as specified in the data sheet. I also checked "Use default startup timeout" and "Halt on XTAL startup error". My problem is that the connected crystal does not work this way. According to the debugger, after switching on I end up in the function CyClockStartupError which means there is an error during clock configuration. I have already tried to increase the timeout time, but this has not led to any change. Is there anything else I have to do to get the external oscillator working? Due to this problem, i tested my software with the internal oscillator of the psoc device.

The second question concerns pwm. Within the scope of the project, an integrated circuit generates a 400 kHz pwm signal from which the psoc is to determine the duty cycle. I know that the frequency of the pwm signal is quite high, but the hardware is already there. I have tried the solution from post and for low frequencies it works so far. For higher frequencies or the target frequency, however, it looks like so many interrupts are generated that the psoc no longer leaves the isr and freezes as long as the signal is present. Since I have no more ideas myself and have not found any other working solutions, I would like to ask everyone if anyone can help me with this problem. The workspace is attached to this post. (The other stuff in the project is working as intended)

Thank you for your help.


Best regards,


1 Solution
Honored Contributor II


Let's first try to solve your first issue (Ext Osc @ 8 MHz).

I've attached a modified version of your project that correctly assigns a digital input as the External Oscillator source.

Here's my steps:

  • Added new schematic page in your TopDesign called Ext_Oscillator.
  • Added a new Digital_Input component with a wire trace called EO_8M.
  • Make the pin assignment for this new input.  For example you can chose P15[0] or P15[1].
  • Changed the System Clocks assignment by
    • deselecting the XTAL check box. 
    • selecting the Digital Signal check box
    • Select the "..." to the right of the Name: field.
    • Selected the EO_8M signal in the "Select source clock" window.
    • Added "8 MHz" in the Frequency: field.
    • Select "OK" to go back to the "Configure System Clocks" window.

  • Len_CONSULTRON_1-1623084390973.png
  • Select the "Osc"  selection in the "IMO" box.
  • Change the "Input:" field to "Digital Signal" in the "PLL" box.

These changes Application Builds without errors.

Give it a try.

"Engineering is an Art. The Art of Compromise."

View solution in original post

3 Replies