cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F334 HRTIM output pin synchronization

licencje1
Associate II
Posted on January 13, 2017 at 21:53

I would like to generate 7MHz output signal with 50% period on/off with complementary output on TA1 and TA2. I have set as follows:

  • TA1: output polarity HIGH, set at timer period event, reset at timer compare unit 1
  • TA2: output polarity LOW,  set at timer period event, reset at timer compare unit 1

So in that configuration signal should have been in complementary mode (phase shifted by 180 deg) but unfortunately they are shifted less than 180deg. 

So my question is how to synchronize that both output pin to let TA1 being opposite polarity to TA2?

My current measurements (Analog Discovery Digilent logic analyser):

0690X000006063AQAQ.png

#stm32f334 #output #hrtim #synchronization
10 REPLIES 10
T J
Lead
Posted on January 13, 2017 at 22:12

Hi, you should be able to use the PWM outputs. 217pS offers an absolute maximum frequency of 460MHz ?

the hardware PWM should give you no delays, no interrupts and less than 10nS jitter (as a guess)

did you use the CubeMX ?

you can use the same values for the PWM timers,

but make one mode 1 and the other mode 2(complimentary output)

I can make up a CubeMX file for you, if you would like

added notes:

its not 460MHz its 4.6GHz !

but the output PIN-clock is slower, 72MHz pin-clock is the limiting factor.

Half this rate and count twice offers your maximum output frequency approx 18MHz with minimal jitter

9Mhz with minimal jitter.

but 7MHz ?, I think there will be jitter.

I think the max jitter is half the clock out rate. so approx 27nS.

licencje1
Associate II
Posted on January 13, 2017 at 22:21

Yes I'm using CubeMX. I would be gratefull if you could make such CubeMX file.

T J
Lead
Posted on January 13, 2017 at 22:37

I had to use an 8MHz crystal to get the maximum processor core frequency.

what is the email address ?

Posted on January 13, 2017 at 22:23

Which exact processor is it ?

there are 8 different available ....

Posted on January 13, 2017 at 22:24

STM32F334C6

Posted on January 13, 2017 at 22:46

patlas92 at gmail.com

T J
Lead
Posted on January 17, 2017 at 00:57

did you get it running ?

Posted on January 17, 2017 at 09:26

What do you mean by TA1/TA2 in terms of DS pins names/ RM signal names?

Is there dead time enabled in HRTIM_OUTxR.DTEN?

JW

licencje1
Associate II
Posted on February 11, 2017 at 13:40

TA1 and TA2 are HRTIM output pins that correspond to TIMERA