Skip to content
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

Enable UART on QSPI pins #2280

Open
retsifp opened this issue Feb 16, 2025 · 8 comments
Open

Enable UART on QSPI pins #2280

retsifp opened this issue Feb 16, 2025 · 8 comments
Milestone

Comments

@retsifp
Copy link

retsifp commented Feb 16, 2025

Hi,

I'm doing tests with the UART bootloader, which is described in the datasheet of RP2350 (Chapter 5.8).
The pins SD2 and SD3 of QSPI are used as TX and RX by the bootloader. It works very good, but it would make sense to use the same pins in 'user mode' for communication with another controller. However it looks like the SDK lacks any functions to switch UART to bank1 pins?
So at the moment it's not possible to use the same pins as the bootloader uses in 'user mode', disregarding the possibility to manually set the registers to do so (but for that I'm too far away ...).

Would be great if there could be a solution in the long term :)

BR Thomas.

@burtyb
Copy link
Contributor

burtyb commented Feb 16, 2025

I think the example in raspberrypi/pico-examples#571 does what you need? It uses qspi_gpio_set_function() to switch the pins to UART and then uses them to communicate with the RP2350 that booted it.

@kilograham kilograham modified the milestones: 2.2.0, 2.3.0 Feb 17, 2025
@retsifp
Copy link
Author

retsifp commented Feb 17, 2025

Wow, @burtyb thanks! :-)
This exactly what I needed, and it works just great!

By the way, my code is here: https://codeberg.org/retsifp/rp2350_uart
Didn't know about this pullrequest and found another solution to embed the 'remote' firmware in the 'main' firmware.

@lurch
Copy link
Contributor

lurch commented Feb 17, 2025

So can this issue be closed @retsifp , or is there still missing SDK functionality that you'd like to see added?

@retsifp
Copy link
Author

retsifp commented Feb 17, 2025

For me it's fine, can be closed if you want.
I guess it would maybe make sense to have the possibility to set the QSPI pin functions with the SDK, but I don't know how much effort that would be :)
Maybe it's as easy as integrating void qspi_gpio_set_function(...) in the SDK?

@lurch
Copy link
Contributor

lurch commented Feb 17, 2025

I'll close this as a duplicate of #1799 then 🙂

@kilograham
Copy link
Contributor

I'll leave this around, just because i thought (and maybe this isn't the case) that it might require changes to our UART code to make this friendly - if this is just a IO and FUNCSEL setup issue, then I guess we can indeed close - i just haven't looked at it in detail

@lurch
Copy link
Contributor

lurch commented Feb 17, 2025

i just haven't looked at it in detail

Me neither 😂 Pinging @will-v-pi as he wrote the previously-mentioned raspberrypi/pico-examples#571

@will-v-pi
Copy link
Contributor

Yeah, it was just an io/pads issue - although stdio_uart_init might need modifications too if we wanted to support that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants