This is on esp32s2 build, Saloa_1_WROOM board but likely applies to others.
I don't have the code in front of me, but roughly:
import board
import busio
uart = busio.UART(board.TX, board.RX, baudrate=115200)
It complains about the RX pin being busy.
Thinking you might at least be able to transmit, you try
uart = busio.UART(board.TX, None, baudrate=115200)
Now it complains about the TX pin being busy.
In ports/esp32s2/boards/espressif_saola_1_wroom/board.c there are these two lines:
// Debug UART
common_hal_never_reset_pin(&GPIO_43);
common_hal_never_reset_pin(&GPIO_44);
If you build with these two lines commented out, then you can access the UART from Python as expected (TX and RX both work over the debugger/bootloader serial port).
What is the reason for the "never_reset_pin" calls?
Should I have tried to instantiate the UART a different way?
(What is the normal/correct way to leverage that extra serial port?)
This is on esp32s2 build, Saloa_1_WROOM board but likely applies to others.
I don't have the code in front of me, but roughly:
import board
import busio
uart = busio.UART(board.TX, board.RX, baudrate=115200)
It complains about the RX pin being busy.
Thinking you might at least be able to transmit, you try
uart = busio.UART(board.TX, None, baudrate=115200)
Now it complains about the TX pin being busy.
In ports/esp32s2/boards/espressif_saola_1_wroom/board.c there are these two lines:
// Debug UART
common_hal_never_reset_pin(&GPIO_43);
common_hal_never_reset_pin(&GPIO_44);
If you build with these two lines commented out, then you can access the UART from Python as expected (TX and RX both work over the debugger/bootloader serial port).
What is the reason for the "never_reset_pin" calls?
Should I have tried to instantiate the UART a different way?
(What is the normal/correct way to leverage that extra serial port?)