esp32/machine_pin: ESP32-P4 pin 54 can't be set to output
Port, board and/or hardware
esp32 port, generic ESP32-P4 board
MicroPython version
MicroPython v1.27.0 on 2025-12-09; Generic ESP32P4 module with ESP32P4
Reproduction
MicroPython v1.27.0 on 2025-12-09; Generic ESP32P4 module with ESP32P4
Type "help()" for more information.
>>> import machine
>>> machine.Pin(53, machine.Pin.OUT)
Pin(53)
>>> machine.Pin(54, machine.Pin.OUT)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: pin can only be input
Expected behaviour
machine.Pin(54, machine.Pin.OUT) should work, because all GPIO pins on the ESP32-P4 are output capable.
Observed behaviour
machine.Pin(54, machine.Pin.OUT) states pin can only be input, which is false.
Additional Information
No, I've provided everything above.
Code of Conduct
Yes, I agree
invalid pin on esp32s3
Port, board and/or hardware
esp32s3
MicroPython version
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
mode:DIO, clock div:1
MicroPython v1.23.0 on 2024-07-20; Specific ESP32S3 module with Octal-SPIRAM with ESP32S3
Reproduction
from machine import Pin
for n in range(48):
try:
a=Pin(n)
except Exception as e:
print('pin',n,'is wrong',e)
else:
print('pin',n,'is ok')
####above is pin test code,following is my costum board file urls###
https://github.com/chieve-bale/esp32s3_v1.23.git
Expected behaviour
all pin is ok,or most of all is ok
even i use official ESP_GENERIC_S3 board,still got similar wrong:from 22 to 32 pin are false
Observed behaviour
%run -c $EDITOR_CONTENT
pin 0 is ok
pin 1 is ok
pin 2 is ok
pin 3 is ok
pin 4 is ok
pin 5 is ok
pin 6 is ok
pin 7 is ok
pin 8 is ok
pin 9 is ok
pin 10 is ok
pin 11 is ok
pin 12 is ok
pin 13 is ok
pin 14 is ok
pin 15 is ok
pin 16 is ok
pin 17 is ok
pin 18 is ok
pin 19 is ok
pin 20 is ok
pin 21 is ok
pin 22 is wrong invalid pin
pin 23 is wrong invalid pin
pin 24 is wrong invalid pin
pin 25 is wrong invalid pin
pin 26 is wrong invalid pin
pin 27 is wrong invalid pin
pin 28 is wrong invalid pin
pin 29 is wrong invalid pin
pin 30 is wrong invalid pin
pin 31 is wrong invalid pin
pin 32 is wrong invalid pin
pin 33 is wrong invalid pin
pin 34 is wrong invalid pin
pin 35 is wrong invalid pin
pin 36 is wrong invalid pin
pin 37 is wrong invalid pin
pin 38 is ok
pin 39 is ok
pin 40 is ok
pin 41 is ok
pin 42 is ok
pin 43 is ok
pin 44 is ok
pin 45 is ok
pin 46 is ok
pin 47 is ok
Additional Information
No, I've provided everything above.
Code of Conduct
Yes, I agree