ESP32S2: UART1 + USB

KWolfe81
Posts: 14
Joined: Mon Dec 13, 2021 7:00 pm

ESP32S2: UART1 + USB

Postby KWolfe81 » Fri Jan 07, 2022 6:34 pm

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.
Last edited by KWolfe81 on Fri Jan 07, 2022 8:20 pm, edited 1 time in total.

KWolfe81
Posts: 14
Joined: Mon Dec 13, 2021 7:00 pm

Re: ESP32S2: UART1 + USB

Postby KWolfe81 » Fri Jan 07, 2022 8:04 pm

EDIT: Deleted, solved issue, see below.
Last edited by KWolfe81 on Fri Jan 07, 2022 8:23 pm, edited 3 times in total.

KWolfe81
Posts: 14
Joined: Mon Dec 13, 2021 7:00 pm

Re: ESP32S2: UART1 + USB

Postby KWolfe81 » Fri Jan 07, 2022 8:17 pm

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

Who is online

Users browsing this forum: No registered users and 109 guests