Page 1 of 1

ESP32S2: UART1 + USB

Posted: Fri Jan 07, 2022 6:34 pm
by KWolfe81
EDIT: Solved, see below.

I can't get UART1 & USB working simultaneously. Does the USB HCI use UART1? If so, I can't find anything in the documentation indicating that.

Re: ESP32S2: UART1 + USB

Posted: Fri Jan 07, 2022 8:04 pm
by KWolfe81
EDIT: Deleted, solved issue, see below.

Re: ESP32S2: UART1 + USB

Posted: Fri Jan 07, 2022 8:17 pm
by KWolfe81
Solved!
Two things:
1) Forgot to set

Code: Select all

#define CFG_TUSB_MCU             OPT_MCU_ESP32S2
2) Looks like UART1 & USB share an interrupt. You need to set

Code: Select all

intr_alloc_flags = ESP_INTR_FLAG_SHARED;
in the call to uart_driver_install()