-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LED pins always configured as PWM outputs #25337
Comments
See e.g. zephyr/boards/arm/twr_ke18f/pinmux.c Line 37 in a0ae534
ftm3 is always enabled in the devicetree leading to the LED pins always being configured as PWM outputs.
|
Setting priority as high, since this breaks existing board definitions. |
Potentially covered by #24745. |
relates to #25251 |
In look at this on at least twr_ke18f we need to decide which case should be the default from the board.dts point of view (GPIO or PWM), and then add overlays to any samples that want to behave differently. The reason for this is we desire to move pinmux configuration into DTS going forward and so when that happens we'll run into this again at that point. So lets just address this once right now. |
Boards impacted:
|
@henrikbrixandersen , @MaureenHelm would appreciate if you can comment on the default setting for the PINs. I would think GPIO and then have blinky_pwm, fade_led, and rgb_led have overlays to switch to PWM instead of GPIO. |
@galak I would say that LEDs as GPIOs would be a sane default. Board specific overlays in the PWM samples could very well be the best way of handling this. |
Add an additional check for CONFIG_PWM to decide if pins associated with LED are configured for GPIO or PWM. Fixes zephyrproject-rtos#25337 Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add an additional check for CONFIG_PWM to decide if pins associated with LED are configured for GPIO or PWM. Fixes #25337 Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add an additional check for CONFIG_PWM to decide if pins associated with LED are configured for GPIO or PWM. Fixes zephyrproject-rtos#25337 Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Describe the bug
I have come across an issue with the recent devicetree changes. For several boards, the
pinmux.c
logic previously decided whether to configure LED pins as GPIOs or PWMs based on Kconfig. Now they decide based onDT_NODE_HAS_COMPAT_STATUS(…, okay)
on the PWM controller, which - at least for some boards - leads to always configuring the LED pins as PWMs, thus breaking samples using the LEDs as GPIOs.This is definitely an issue with several NXP boards, but similar issues may exist on other boards.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Amber LED (led0, D9) should blink.
Impact
Unable to control LEDs using GPIOs.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: