Skip to content

Conversation

@sfe-SparkFro
Copy link
Contributor

Summary

Follow up from #17692. Adds the HSTX alternate pin function for GPIO12-19 on the RP2350.

Testing

Tested with an RP2350B board, and seems to work fine!

>>> machine.Pin(12, mode=machine.Pin.ALT, alt=machine.Pin.ALT_HSTX)
Pin(GPIO12, mode=ALT, alt=HSTX)

@github-actions
Copy link

github-actions bot commented Nov 21, 2025

Code size report:

Reference:  shared/runtime/pyexec: Set PYEXEC_FORCED_EXIT flag for SystemExit. [a686410]
Comparison: rp2: Add HSTX ALT function. [merge of 7a554db]
  mpy-cross:    +0 +0.000% 
   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO_W
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:    +0 +0.000% VIRT_RV32

Follow up from micropython#17692.

Signed-off-by: Dryw Wade <dryw.wade@sparkfun.com>
@sfe-SparkFro
Copy link
Contributor Author

sfe-SparkFro commented Nov 21, 2025

Forgot that af_idx is now increased by one, affecting this spot too, fixed with 7a554db!

Copy link
Member

@dpgeorge dpgeorge left a comment

Choose a reason for hiding this comment

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

Thanks, this looks good.

I tested on a RPI_PICO2_W, and the HSTX function could be selected correctly. And other existing alt functions seemed to be correct.

I also tested building RPI_PICO and found that the firmware is unchanged with this PR, which is as expected (binary equivalent except for the changing git hash that's embedded in the firmware).

@dpgeorge dpgeorge added this to the release-1.27.0 milestone Nov 23, 2025
sfe-SparkFro added a commit to sparkfun/red_vision that referenced this pull request Nov 24, 2025
In anticipation of micropython/micropython#18458,
which is slated for the v1.27.0 release.
@dpgeorge
Copy link
Member

dpgeorge commented Dec 1, 2025

Rebased and merged in 1ef76c7

@dpgeorge dpgeorge closed this Dec 1, 2025
@sfe-SparkFro sfe-SparkFro deleted the rp2_pins_af0 branch December 1, 2025 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants