cancel
Showing results for 
Search instead for 
Did you mean: 

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.

ORidl.1
Associate

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:

  1. Changing the Set and Reset registers
  2. 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.

2 REPLIES 2
NBuso.1
Associate

Hi, I have the same problem. Did you find a solution?

ORidl.1
Associate

Unfortunately not, I moved on to other design tasks. I'd love to know the solution if you find it.

Oliver