arduino-pico
arduino-pico copied to clipboard
Feature Request: Add support for CheckPicoW() for the Pico2/2W
Currently the CheckPicoW() is guarded with #ifdef PICO_RP2040 - else true. This will incorrectly return true on a Pico 2 (non-W).
It would be great if this runtime check could be made to work with each of the Pico/Pico-W/Pico2/Pico2-W versions.
I appreciate all the time and effort you put into maintaining this project, Thanks!
I commented out the PicoW check on the RP2350 boards because it uses some special analog tests that were valid on the PicoW. I am not certain they work properly on the Pico 2W (don't have one yet) or if it works on boards with the CYW43 RP-WiFi module like the SparkFun Thing Pro RP2350.
If the RPi folks could provide some boilerplate code that would be really awesome here. The original code came from one of their appnotes...
I commented out the PicoW check on the RP2350 boards because it uses some special analog tests that were valid on the PicoW ...
Schematic:
- W https://datasheets.raspberrypi.com/picow/pico-w-datasheet.pdf
- 2W https://datasheets.raspberrypi.com/picow/pico-2-w-schematic.pdf
GPIO 25 and 29 circuits looks identical
I am not certain they work properly on the Pico 2W (don't have one yet)
I just got my Pico2W's yesterday. I pulled the CheckPicoW() code into my sample app and ran it and it fell into the gp25 "cant tell" branch - so something seems to be different here unfortunately, even though the circuits look identical.
Edit: A bit more testing shows the ADC check seems to work fine, but the gp25 does not.
Edit: A bit more testing shows the ADC check seems to work fine, but the gp25 does not.
Q1 is FET. GPIO 25 is connected to it's Gate
I am curious why this code is trying to READ the state of this Gate rather than to set it to HIGH or LOW in order to switch the FET On or Off.
Inappropriate GPIO 25 READ value can be caused by this RP2350 errata: https://github.com/earlephilhower/arduino-pico/blob/master/docs/rp2350.rst#p2350-e9-errata-increased-leakage-current-on-bank-0-gpio-when-pad-input-is-enabled
Check https://github.com/earlephilhower/arduino-pico/blob/0061d3f97fd4c610f735bd19caf74eb414da3d6d/cores/rp2040/cyw43_wrappers.cpp#L114-L115 for the source of the code. I didn't dig into the specifics, sorry.
Anyone interested who has a new RP2350 A4 + RP.WIFI module to test the original Pico 1 code on it? The Pico2Ws from R.PI will be using earlier chip revs until their stock runs out, so we can't try on a currently available Pico2W.
If it does work on the A4, then we can use a HW rev. check to either always return true (pre-A4) or run the check (A4 and beyond).