How can I read bootsel button status in pico 2 w
I wonder if it is possible to use this example in pico 2 w and if it isn't possible then what should I do?
I figured out only the led part doesn't work, so should I make a pull request?
Sure - bonus if you use the new pico_status_led library.
Btw since you have some knowledge about pico 2 w and w series overall, why is it so different from pico (non w series) to turn on led? I mean sdk code which I'm interested. I looked at it and it is much much different than what normal pico does. It's important for me since one of the main reasons I bought pico 2 w over pico w is that it has RISC-V cores and it I needed wireless connectivity so I bought one. but shouldn't it be the same except only wireless part? why led part is also different under the hood? And thank you for your suggestion I did make a pull request.
The led is connected to a cyw43 gpio because there are no spare gpio pins.
@A404M See https://github.com/raspberrypi/pico-examples/tree/master/blink_simple and https://github.com/raspberrypi/pico-examples/tree/master/blink and https://github.com/raspberrypi/pico-examples/pull/507 (and https://www.raspberrypi.com/documentation/microcontrollers/pico-series.html#pinout-and-design-files-2 ) for more info. But the good news is that if you use the pico_status_led library that Peter suggested, you don't have to worry about any of that, because the library handles the complexity for you.
My goal is to have all code I need for my project to be rewritten by myself in RISC-V assembly. It's just for practicing assembly and a minimalist approach to the code pico 2 w. Is there anyway to bypass cyw43 sdk for now to turn on led in pico 2 w? I mean a code which doesn't use cyw43 driver under the hood.
No
...unless of course you ignore the built-in LED on the Pico 2 W, and just use a (separate) regular LED and a resistor connected to one of the normal GPIO pins.
...unless of course you ignore the built-in LED on the Pico 2 W, and just use a (separate) regular LED and a resistor connected to one of the normal GPIO pins.
That's kinda doable. What if I buy pico 2 (non-w) would it be easy to do all stuff I need in assembly instead of calling C functions? I mean I guess LED is in GPIO 26 or something in that board so can I implement a minimal sdk for pico 2 in assembly myself?
I mean I guess LED is in GPIO 26 or something in that board
See the helpful pinout diagrams at https://www.raspberrypi.com/documentation/microcontrollers/pico-series.html
- On Pico, Pico H and Pico 2, the on-board LED is connected to GPIO25 on the RP2040 or RP2350
- On Pico W, Pico WH and Pico 2 W, the on-board LED is connected to WL_GPIO0 (i.e. GPIO0 on the CYW43439 chip)
would it be easy to do all stuff I need in assembly instead of calling C functions? can I implement a minimal sdk for pico 2 in assembly myself?
How "easy" it is obviously depends on how comfortable you are with writing assembly code. But these are the kinds of questions you should be asking at https://forums.raspberrypi.com/viewforum.php?f=143 rather than on GitHub.