Using PWM to dim the LEDs of a NUCLEO-F746ZG #13739
Unanswered
mdaeron
asked this question in
STM32 / Pyboard
Replies: 1 comment 1 reply
-
I've looked into this a bit mode closely, and here is what I found so far:
LED operation is defined in
I assume that my attempt with I suspect (but haven't tested yet) that modifying this part of
For LEDs 1 and 3, might the problem be that the timer channel for AF1 is inverted, and the code in I'll keep trying and report here. Any hints appreciated. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm experimenting with a NUCLEO-F746ZG board. Using the following code I can control the brightness of LED1 (although the percentage is reversed due to the
B0
pin having an inverted PWM/timer/channel).Next I wanted to try and implement this in firmware, as the pyboard does for LED(3) and LED(4). In
ports/stm32/boards/PYBV11/mpconfigboard.h
I find:And in
ports/stm32/boards/NUCLEO_F412ZG/mpconfigboard.h
I find:I tried adding variations of this code to
boards/NUCLEO_F746ZG/mpconfigboard.h
but the resulting firmware remains unable to smoothly dim LEDs usingmachine.LED.intensity()
.Does anyone have pointers/documentation on what the code above actually do, and how to adapt it so that it controls one or more LEDs on the F746ZG?
Beta Was this translation helpful? Give feedback.
All reactions