PWM Output Turning On/Off | Cypress Semiconductor
PWM Output Turning On/Off
I am using a 16-bit PWM fed with a 12Mhz clock on a PSoC 5.
The PWM is set up in the 'TopDesign' with a period of 1600 counts (approx 133us) and a compare of 100 counts. It is implemented as a UDB block.
The only code I have is PWM_Start(), and then PWM_WriteCompare(100), followed by for(;;) to trap the processor.
However, the PWM output keeps turning on and off for periods of time that average around 20ms, as shown in the attached picture. When the PWM is on, it is at the right frequency. But then the output will go low (scope is showing the inverted output of the PWM), for between 5-20ms before repeating.
I have checked, and the 48MHz oscialltor the PSoC 5 is running off is stable. This problem appears as soon as PWM_Start() is called.
All interrupts are disabled