EspTinyUSB for ESP32-C3

Da Flex
Posts: 19
Joined: Mon Jul 12, 2021 10:32 pm

EspTinyUSB for ESP32-C3

Postby Da Flex » Mon Jul 12, 2021 11:43 pm

Dear community,
thanks for getting the ESP32-C3 DevKit M-1 as a free sample! I want to use it to filter USB-MIDI events. So I need the EspTinyUSB library to deal with USB.

I was able to run the examples of ESP32 2.0.0 Alpha 1 on Arduino IDE 1.8.15. I've been installed Esp32TinyUSB 1.3.0 from Arduino IDE's library manager. This library was made for ESP32-S2, but I have ESP32-C3. So I get this error when I try to compile the "midi" example, provided by Esp32TinyUSB:

Code: Select all

home/user-name/projects/arduino/libraries/ESP32TinyUSB/src/esptinyusb.cpp:3:10: fatal error: soc/usb_periph.h: No such file or directory
Does anyone has a workaround for this issue? Any approach to make USB-MIDI work on ESP32-C3 is welcome.


Thanks!
Da Flex

lbernstone
Posts: 669
Joined: Mon Jul 22, 2019 3:20 pm

Re: EspTinyUSB for ESP32-C3

Postby lbernstone » Tue Jul 13, 2021 2:47 am

There is no USB controller on the ESP32-C3, so AFAIK it is not possible to use USB without bitbanging.

ESP_Sprite
Posts: 9040
Joined: Thu Nov 26, 2015 4:08 am

Re: EspTinyUSB for ESP32-C3

Postby ESP_Sprite » Tue Jul 13, 2021 3:55 am

Yep. The USB controller in the C3 is a simple single-function device. You'll need a -S2 (or a -S3) if you want configurability to e.g. USB-MIDI.

Da Flex
Posts: 19
Joined: Mon Jul 12, 2021 10:32 pm

Re: EspTinyUSB for ESP32-C3

Postby Da Flex » Tue Jul 13, 2021 2:46 pm

Thanks a lot for your answers! Then I'll buy an S2 or S3, if I find a dealer.

Da Flex

Da Flex
Posts: 19
Joined: Mon Jul 12, 2021 10:32 pm

Re: EspTinyUSB for ESP32-C3

Postby Da Flex » Tue Jul 13, 2021 5:53 pm

PS: It's hard to find all ESP32-S2 boards on the market these days. ESP32-S2-WOOR (containing a WROOM chip) is available. It has an USB-Type-C connector. Does it work to read USB-MIDI from USB-Type-C, filter some events out, and write to some other output pins? It would be like an USB pass-through, just with some data filtered out.

Da Flex
Posts: 19
Joined: Mon Jul 12, 2021 10:32 pm

Re: EspTinyUSB for ESP32-C3

Postby Da Flex » Tue Jul 13, 2021 10:17 pm

PPS: Looks like USB-Type-C is just for programming, and EspTinyUSB goes exclusively over breakout pins:
https://github.com/chegewara/EspTinyUSB

lbernstone
Posts: 669
Joined: Mon Jul 22, 2019 3:20 pm

Re: EspTinyUSB for ESP32-C3

Postby lbernstone » Wed Jul 14, 2021 2:48 am

Da Flex wrote:
Tue Jul 13, 2021 5:53 pm
PS: It's hard to find all ESP32-S2 boards on the market these days. ESP32-S2-WOOR (containing a WROOM chip) is available. It has an USB-Type-C connector. Does it work to read USB-MIDI from USB-Type-C, filter some events out, and write to some other output pins? It would be like an USB pass-through, just with some data filtered out.
The esp32-s2 is available to a large chunk of the world at mouser.com in both module and dev board. Datasheets are there, too.
It has fairly complete USB support with tinyusb.

Da Flex
Posts: 19
Joined: Mon Jul 12, 2021 10:32 pm

Re: EspTinyUSB for ESP32-C3

Postby Da Flex » Wed Jul 14, 2021 3:21 am

@lbernstone I've been ordered the Lilygo ESP32-S2-WOOR. USB programming is new territory to me, and very cool on an MC. :)

Who is online

Users browsing this forum: No registered users and 81 guests