- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
How can I start multiple PWM together without using hardware trigger signal. In PSoC-4 we could do the following:
PWM_1_TriggerCommand(PWM_1_MASK | PWM_2_MASK, PWM_1_CMD_START);
This would start PWM_1 and PWM_2 simultaneously.
How can I do the same with PSoC-6?
Thanks
Solved! Go to Solution.
- Labels:
-
PSoC 6 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mrinal,
Which PSoC6 device are you targeting?
The PSoC6 does not provide a "SW" means of synchronizing the PWMs. It uses a PDL-style of coding which in itself does not allow for combined 'starts', 'stops' or 'kills' of multiple PWM channels.
How 'synchronized' must the PWM channels be? You can serially start multiple PWM channels with a fast BUS_CLK and very low latency if you temporarily turn off GLobal Interrupts.
Some PSoC6s have UDBs available. This allows you to create an internal HW signal path (without exiting the IC) to synchronize starts.
Another less elegant way is to 'gate' the PWM clock source. If the PWMs are attached to the same clock, you can turn off the PWM clock source, start the PWM in SW by writing to the PWM registers, then restart the PWM clock source.
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mrinal,
Which PSoC6 device are you targeting?
The PSoC6 does not provide a "SW" means of synchronizing the PWMs. It uses a PDL-style of coding which in itself does not allow for combined 'starts', 'stops' or 'kills' of multiple PWM channels.
How 'synchronized' must the PWM channels be? You can serially start multiple PWM channels with a fast BUS_CLK and very low latency if you temporarily turn off GLobal Interrupts.
Some PSoC6s have UDBs available. This allows you to create an internal HW signal path (without exiting the IC) to synchronize starts.
Another less elegant way is to 'gate' the PWM clock source. If the PWMs are attached to the same clock, you can turn off the PWM clock source, start the PWM in SW by writing to the PWM registers, then restart the PWM clock source.
"Engineering is an Art. The Art of Compromise."