Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
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 https://community.cypress.com/t5/PSoC-5-3-1-MCU/PSoC-5LP-Duty-Cycle/m-p/213916 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)