I'm trying to use HRTIM to generate non-overlaping PWM pulses on 2 outputs, and be able to change which output is first in time. I've tried various methods and find when I change the output order, it corrupts the pulse lengths and they overlap.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-06 4:02 AM
Nulceo 64- F334R8.
Using Timer A on HRTIM1 to generate non-overlaping PWM pulses on 2 separate outputs. I use 4 CMP registers, defining the start and end time of each pulse (CMP1 = pulse 1 start, CMP2 = pulse 1 end, CMP3 = pulse 2 start, CMP4 = pulse 2 end).
I've tried 2 different methods of changing the pulse output order but both sometimes result in extra long pulses and on time overlap:
- Changing the Set and Reset registers
- Swapping content of CMP 1 with 3, and CMP 2 with 4.
I have enabled PREEN, so all the registers should be updated at the same time.
The output pulses are doing what I want EXCEPT when I change the order of outputs, sometimes both outputs end up being high at the same time, which would result in disaster.
Is there a standard/suggested way to achieve what I am trying to do?
Thanks,
Oliver.
- Labels:
-
HRTIM
-
STM32F3 Series
-
TIM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-31 1:01 AM
Hi, I have the same problem. Did you find a solution?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-01 3:02 PM
Unfortunately not, I moved on to other design tasks. I'd love to know the solution if you find it.
Oliver
