- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Respected members,
I am encountering a problem regarding parallel execution of two PWM blocks. For example, if I start PWM blocks with same parameters (freq, cmp, etc.) then at oscilloscope there is always a phase-shift between two PWMs. And if I try to change the order of the execution statements (PWM_Start();) then I get negative phase-shift. Is there anyway to get rid of this phase-shift and start two PWMs with zero phase-shift?
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Configure the PWMs to run only when the "start" signal is active (hardware enable). Then route this signal to a control register. That way you need to activate the signal on the register, and both PWMs start at the same time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
(Note: I did something similar here: https://blog.hendriklipka.de/archives/2016/03/stairstep_gen_1.html )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your response,
Its not working, I enabled the PWM with hardware with ControlReg but still I needed to write the "PWM_1_Start();" and "PWM_2_Start();"in main prog.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you need to start the components, but as long as the control register is 0 the PWMs won't start.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Its working now.
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how do i enable the 2 pwm outputs from same block asynchronously ie at different times?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think you cant:
Alternatively, plz refer to following application note.
You need to add PSFB component to your project. That component will have four outputs you can use 2 out of 4 as per your requirements.