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

Feature Request: Add support for CheckPicoW() for the Pico2/2W #2671

Open
erichelgeson opened this issue Dec 5, 2024 · 5 comments
Open

Feature Request: Add support for CheckPicoW() for the Pico2/2W #2671

erichelgeson opened this issue Dec 5, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@erichelgeson
Copy link

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!

@erichelgeson erichelgeson changed the title Add support for CheckPicoW() for the Pico2W Add support for CheckPicoW() for the Pico2/2W Dec 5, 2024
@earlephilhower earlephilhower changed the title Add support for CheckPicoW() for the Pico2/2W Feature Request: Add support for CheckPicoW() for the Pico2/2W Dec 5, 2024
@earlephilhower earlephilhower added the enhancement New feature or request label Dec 5, 2024
@earlephilhower
Copy link
Owner

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...

@lyusupov
Copy link
Contributor

lyusupov commented Dec 5, 2024

I commented out the PicoW check on the RP2350 boards because it uses some special analog tests that were valid on the PicoW ...

Schematic:

  1. W https://datasheets.raspberrypi.com/picow/pico-w-datasheet.pdf
  2. 2W https://datasheets.raspberrypi.com/picow/pico-2-w-schematic.pdf

GPIO 25 and 29 circuits looks identical

image

@erichelgeson
Copy link
Author

erichelgeson commented Dec 5, 2024

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.

@lyusupov
Copy link
Contributor

lyusupov commented Dec 5, 2024

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.

image

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

@earlephilhower
Copy link
Owner

Check

// Taken from https://datasheets.raspberrypi.com/picow/connecting-to-the-internet-with-pico-w.pdf
// also discussion in https://github.com/earlephilhower/arduino-pico/issues/849
for the source of the code. I didn't dig into the specifics, sorry.

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

No branches or pull requests

3 participants