2017-10-30 03:45 AM
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.
#invert #signal #output #pwm #timer #stm32l42017-10-30 05:57 AM
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.
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.
2017-10-30 06:05 AM
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
2017-10-31 03:01 AM
Okey, thank you. I didn´t know about that
2017-10-31 03:02 AM
thank you
2017-10-31 03:09 AM
Hi,
Take a look at Timer AN
Regards
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.
2017-11-02 03:28 AM
Sorry to bother you again, but I´ve never used PWM Generation CH1 CH1N.
So when I try to debug my program it appears an error and I don´t know what do I have to do.
Do I have to setup the CH1N???
I´m using ECLIPSE Ide, so if you know what do I have to do, please tell me.
2017-11-02 06:57 AM
Hello Endika Caño
So when I try to debug my program it appears an error and I don´t know what do I have to do.- Can you provide more information concerning error you are facing during debug ? Any console capture image ?
- Do you Use CubeMX program configurator and generator ?
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.
2017-11-06 02:02 AM
Hello:
Finally I´ve been able to fix it. It didn´t set up correctly a HAL driver.
Thank you so much for your help, it has really helped me.