Skip to main content
Endika Caño de Miguel
Associate III
October 30, 2017
Question

How to invert TIMER signal?

  • October 30, 2017
  • 8 replies
  • 2171 views
Posted on October 30, 2017 at 11:45

Hello everybody:

I�m running my STM32L432  Timer 2 as a PWM and I need to take out from a pin the signal and same one inverted, but I don�t know how to do it. Any help would mean the world to me

I need something like the photo.

Thank you in advance.

0690X00000604B8QAI.jpg

#invert #signal #output #pwm #timer #stm32l4
This topic has been closed for replies.

8 replies

RomainR.
ST Employee
October 30, 2017
Posted on October 30, 2017 at 13:57

Hello,

TIMER2 is a General Purpose 32bit. But it doesn't contains inverted channel.

You should use TIMER1 or TIMER15 or 16. 

See chapter 26.4.12 Complementary outputs and dead-time insertion in reference manual.

0690X00000608nyQAA.png
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Endika Caño de Miguel
Associate III
October 31, 2017
Posted on October 31, 2017 at 10:01

Okey, thank you. I didn´t know about that

RomainR.
ST Employee
October 31, 2017
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
waclawek.jan
Super User
October 30, 2017
Posted on October 30, 2017 at 14:05

Use a second channel in the opposite PWM mode, i.e. if you used the first pin in PWM1 mode, use the other in PWM2 mode.

You'll need to change the CCR value for both pins/channels simultaneously.

JW

Endika Caño de Miguel
Associate III
October 31, 2017
Posted on October 31, 2017 at 10:02

thank you