Idle pin state in PWM #2447
-
Arduino_Core_STM32 2.8.0 + Arduino IDE 2.3.2 I use this part of code to initialize a PWM:
PWM works well. But when I use it in my various parts of the code, doing:
after pause() the PWM signal in the idle state is sometimes at a logical high level (wrong) and sometimes correctly at a low (correct) level. It should always be low when pause(). |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hi @DonatelloX If you want it at low state then try to use the |
Beta Was this translation helpful? Give feedback.
-
Thank you. I have changed your pause() routine in HardwareTimer.cpp:
|
Beta Was this translation helpful? Give feedback.
Thank you.
I use:
timerTreatment->setCount(timerTreatment->getOverflow()-1);
after:
timerTreatment->pause();
and I think it works now.
I have changed your pause() routine in HardwareTimer.cpp: