Skip to content

ESP32: UARTConfig mostly ignored #5439

@kenbell

Description

@kenbell

The current ESP32 UART code only honors the BaudRate in the standard UARTConfig struct.

This makes it difficult to re-route UARTs to non-standard pins as the GPIO MUX needs to be re-configured to map the UART signals to the desired pins. The code to do this mapping is private to the machine package, so can't be re-use by application logic.

This is example code trying to map UART1 to non-standard pins:

uart := machine.UART1
uart.Configure(machine.UARTConfig{
	BaudRate: 9600,
	TX:       RS485_TX_PIN,
	RX:       RS485_RX_PIN,
})

Current behaviour
No UART / RS485 functionality - signals go missing

Expected behaviour
UART works :)

I've got a patch incoming to fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingesp32next-releaseWill be part of next release

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions