Skip to content

Is lockout of uart0 intentional? #3811

@kbanks-krobotics

Description

@kbanks-krobotics

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?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugespressifapplies to multiple Espressif chips

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions