Skip to content

drivers: udc: rpi_pico: fix RP2350 warm ep init #91905

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dsseng
Copy link
Contributor

@dsseng dsseng commented Jun 19, 2025

There was an issue that RP2350's USB controller won't start after a boot
through bootloader (for example a RAM-only boot)

For some reason this could be worked around by a k_usleep(10) added to
the enable function, however it was discovered that endpoint setup was
in the init function and not in enable function.

This led to DPSRAM likely being in the wrong state, as the enable path
zeroes its contents.

Fixed by moving internal endpoint enable/disable into enable/disable
from init/shutdown. This is done the same way in the
nrf, samd, dwc2 and stm32 drivers.

This also matches init sequency tinyusb does more closely.

Signed-off-by: Dmitrii Sharshakov d3dx12.xx@gmail.com

@github-actions github-actions bot added the area: USB Universal Serial Bus label Jun 19, 2025
Copy link

@dsseng
Copy link
Contributor Author

dsseng commented Jun 19, 2025

Tested with webusb-next, console-next and midi samples, all seem functional

@josuah josuah added the platform: Raspberry Pi Pico Raspberry Pi Pico (RPi Pico) label Jun 19, 2025
Move control endpoint enable/disable calls to udc_enable()/udc_disable().
It does not change much during USB device support initialization, but
it seems to resolve an issue when starting from RAM, though the real
cause is unknown.

Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Copy link

Copy link
Contributor

@jfischer-no jfischer-no left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: USB Universal Serial Bus platform: Raspberry Pi Pico Raspberry Pi Pico (RPi Pico)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants