You may control a PWM using a control register. Depending on your underlying hardware (PSoC 4 or 5) there are some signals you can control. A PWM_Stop() disables the component, so the LED cannot blink. If it does as you reported, there must be something wrong.
Several ways -
A couple of corrections in comments -
My code is below and schematic attached.When I run, the Leds start flashing at 500ms rate, I expect them to flash for 5 seconds and stop flashing for 2 seconds.
CyDelay(5000); //Leds flash for 5 seconds
CyDelay(2000); //Leds off for 2 seconds
Schematic2.JPG 28.4 K
Bye the way, how did you get images into the post. Did you copy and paste or use the image box from menu or something?
If you select stuff on schematic, copy to clipboard, and paste using Firefox works
most of the time.
Note on PWM you can also use kill input to force PWM out to a known state.
I have filed a CASE because datasheets do not discuss what state output is
in when a Stop() is issued, or a disable for that materr.
Lastly here is another approach, using PrISM for led driving -
Will the Prism module output a constant on/off signal at say 500ms? It appears to be referred to a psuedo random number thta would result in "random" pulse output?
I suppose the other way is to set the value of te PWM to 0. Could I just use the clock directly onto the LED?
It is just to blink an LED in hardware. And enable/disable it as needed.
The particulars back from Cypress -
In the Fixed function implementation the pwm ouput retainins the previous state if a Stop() is issued.
In UDB implementation the output pwm1 or pwm2 will reset to logic 0.
A doc update will be done inclduing this info.