Replies: 1 comment
-
You first need to lookup your ST datasheet for the alternate function mapping (table 13 on p89) We could do the pin muxing ourself, our simply use the node &tim4_ch2_pb7, which is defined in the ST/HAL pinctrl dtsi: Since we're using timer4, we need to enable that node, as well configure the corresponding pwm4 function:
The last bit consists of defining the pwmleds. For the pwms phandle array, the definition for the items to pass is given by the ST pwm yaml file (see #pwm-cells):
Hope this helps! |
Beta Was this translation helpful? Give feedback.
0 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Help needed with PWM on nucleo_f676zi
Hi, I've been trying to get PWM working with the built-in LEDs of the
nucleo_f767zi
board, however no matter what period/pulse width I set the pin output stays @ 50% duty cycle.There's a high possibility that I've misconfigured the timer or pwm device, though I've followed the docs and everything I've found online.
Here's the overlay I'm using for the f767 nucleo board:
And the snippet I'm trying the PWM with:
pwm_is_ready
is returning true,pwm_set_dt
are returning 0, but still, the LED stays @ 50% duty cycle.Tried lowering the frequency, changing pull-up/pull-down config - frequency changes had no effect, if configured as pull-down then the output was 0 throughout the run, same when using the
tim4_ch2_pb7
pre-defined pinctrl node.Any help would be kindly appreciated! ^^
Environment
Beta Was this translation helpful? Give feedback.
All reactions