STM32F411RE PWM support #30014
Labels
area: PWM
Pulse Width Modulation
bug
The issue is a bug, or the PR is fixing a bug
platform: STM32
ST Micro STM32
priority: low
Low impact/importance bug
Describe the bug
I am using a ST Nucleo F411RE board with an STM32F411RE microcontroller. According to the documentation, it should support PWM. However, according to the DTS file for the board it does not enable any timer and PWM device.
I have tried to enable it manually with an overlay:
And specifying the following in
prj.conf
:This compiles and flashes successfully. No error is logged at any point when using the PWM API, however the actual produced pulse is 'quirky'.
I used this code to test the PWM: https://gitlab.com/flnhst/st_nucleo_pwm/-/blob/master/src/main.cpp
On PWM 2, channel 1, it produces a pulse, however, when the first loop through the periods is done, the output stays low, and no pulse is ever produced again.
On PWM 4, channel 3, it produces a pulse, with an inaccurate period (few dozen microseconds off), and the wrong pulse length.
On some PWM devices and channels there is no pulse at all.
To Reproduce
You can see the source at https://gitlab.com/flnhst/st_nucleo_pwm/-/tree/master .
I build and flash using:
Expected behavior
Functional PWM capabilities as described in the documentation.
Logs and console output
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: