Skip to content

The blinky_pwm sample does not work on raspberry pi pico #51546

@Xiongfeng-Jin

Description

@Xiongfeng-Jin

Describe the bug
I am trying to build the PWM led on raspberry pi pico, but for some reason the blinky_pwm sample does not work on my raspberry pi pico (the led did not light up). Zephyr version (3.2.99)
I tried to modify the dts file for the raspberry pi pico, adding the "status = "okay";" under the "pwm" device and the "pwm-led" since it was disabled initially. I also tried to modify the "pinctrl-0" under "pwm" device to use different pins but did not success.
I also tried to updated the "pwms = <&pwm 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>;" under the "pwm-led" node, because if I use the channel number greater than 1 then the "pwm_set_dt" in the C code will return -22 which means the driver failed to set the pwm.
On the other hand, the blinky sample did work for me, so I am guessing there might be something wrong with pwm driver, but I was not able to find any suspicious code.

To Reproduce
Steps to reproduce the behavior:

  1. build the blinky_pwm sample for raspberry pi pico

Expected behavior
the LED should light up.

Metadata

Metadata

Assignees

Labels

area: PWMPulse Width ModulationbugThe issue is a bug, or the PR is fixing a bugplatform: Raspberry Pi PicoRaspberry Pi Pico (RPi Pico)priority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions