2019-11-22 04:42 AM
Hello,
I am using STM32 CubeMX tool for code generation and using Keil IDE with STM32F479NI Eval board.
For my application I want to generate N pulses on PWM channel using One pulse Mode (OPM).
observed that , current example firmware uses OPM with one input channel ( input trigger ) and one output channel (PWM output). but I have only output channel for output pulses.
According to "Application note: General-purpose timer cookbook for STM32 microcontrollers"
this can be possible. But, I couldn't get expected results and also confused with cubeMX settings for the same. Could you please help me for the same?
2019-11-22 05:02 AM
Just set up the timer for PWM as usually, set the RCR register for required number of pulses, set the OPM bit in CR1 for One-pulse mode, and simply enable the timer by setting CR1.CEN (the last step replaces the external trigger).
I don't use Cube/CubeMX.
JW
2019-11-22 05:55 AM
The Advanced TIM have a repetition count so a triggered OPM generates multiple pulses.
Can be triggered manually when no input available/desired