Trouble with PWM on STM32 Blackpill V1.2 (STM32F401CCU6TR) #81172
Unanswered
Aditya-A-garwal
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone! I am new to Zephyr, and decided to use the STM32 Blackpill to control servo motors and ESCs with PWM signals. To start, I wanted to use Timer 5 to generate PWM signals on all 4 channels. Eventually, I intend to use more timers and even capture PWM signals (from a flysky receiver). For a reason I can't seem to find, the
pwm_set
function is failing.In the above image (taken from https://docs.zephyrproject.org/latest/boards/weact/blackpill_f401cc/doc/index.html), It says that we can use PA0...3 with Timer 5. This is also shown in the datasheet, along with the alternate function mode -
My devicetree overlay (boards/blackpillf401cc.overlay in the project directory) -
My src/main.c file -
I have tried it without the gpio led driver, and it still seems to fail. Can someone help me with this? I am completely stuck. I am using the following platform -
OS: Windows
Compiler: arm-none-eabi-gcc (version 12)
Runner: Openocd
Debugger: STLink
Appreciate all suggestions! Looking forward to contribute sensor drivers for some IMUs to Zephyr eventually.
Beta Was this translation helpful? Give feedback.
All reactions