8000 pico w: pins improvements by jepler · Pull Request #7021 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

pico w: pins improvements#7021

Merged
dhalbert merged 1 commit intoadafruit:mainfrom
jepler:pico-w-vbus-sense
Oct 10, 2022
Merged

pico w: pins improvements#7021
dhalbert merged 1 commit intoadafruit:mainfrom
jepler:pico-w-vbus-sense

Conversation

@jepler
Copy link
Copy Markdown
@jepler jepler commented Oct 7, 2022

Closes: #7017

  • Remove the 'GP23' alias for CYW1
  • Remove the 'CYW0' alias for CYW0
  • Switch VBUS_SENSE to CYW2, remove 'GP24' alias

Code that wants to use SMPS_MODE, VBUS_SENSE and LED while being portable to the W and non-W variants should use those names, not alias names.

  • Remove A3 / VOLTAGE_MONITOR

Right now the voltage monitor cannot be used. The ability to check the voltage monitor should be added back in some fashion in the future. (#7020)

Closes: adafruit#7017

 * Remove the 'GP23' alias for CYW1
 * Remove the 'CYW0' alias for CYW0
 * Switch VBUS_SENSE to CYW2, remove 'GP24' alias

Code that wants to use SMPS_MODE, VBUS_SENSE and LED while being
portable to the W and non-W variants should use those names, not alias
names.

 * Remove A3 / VOLTAGE_MONITOR

Right now this cannot be used. The ability to check the voltage monitor
should be added back in some fashion in the future.
@jepler
Copy link
Copy Markdown
Author
jepler commented Oct 7, 2022

@anecdata is this an improvement over the status quo? any suggestions on improvements?

@anecdata
Copy link
Copy Markdown
Member
anecdata commented Oct 7, 2022

Yes, looks like this prohibits user access to special pins 23, 24, and 25, and adds / fixes user access to WL_GPIO1 / CYW1 / SMPS_MODE and WL_GPIO2 / CYW2 / VBUS_SENSE. I'll try to test today or tomorrow, but don't let me hold things up. Thanks!

Copy link
Copy Markdown
Member
@anecdata anecdata left a comment

Choose a reason for hiding this comment

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

The CYW* pins look fine:

>>> led = digitalio.DigitalInOut(board.LED)
>>> led.switch_to_output(False)
>>> led.value = True
>>> 
>>> smps_mode = digitalio.DigitalInOut(board.SMPS_MODE)
>>> smps_mode.switch_to_output(False)
>>> smps_mode = True
>>> 
>>> vbus_sense = digitalio.DigitalInOut(board.VBUS_SENSE)
>>> vbus_sense.value
True

(didn't explore power ramifications of SMPS_MODE)

Should this be inaccessible for now? Maybe it doesn't matter since users can't do anything with it.

>>> gpio29 = analogio.AnalogIn(microcontroller.pin.GPIO29)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: GPIO29 in use

@dhalbert
Copy link
Copy Markdown
Collaborator

Should this be inaccessible for now? Maybe it doesn't matter since users can't do anything with it.

>>> gpio29 = analogio.AnalogIn(microcontroller.pin.GPIO29)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: GPIO29 in use

I will approve and merge if this is not a remaining issue.

@jepler
Copy link
Copy Markdown
Author
jepler commented Oct 10, 2022

This is expected for now

Copy link
Copy Markdown
Collaborator
@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

Thanks for the fixes and thanks @anecdata for the review.

@dhalbert dhalbert merged commit 8d34445 into adafruit:main Oct 10, 2022
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

Successfully merging this pull request may close these issues.

Pico W pin names and functions need tweaking?

3 participants

0