esp32 c3 read input from usb
Posted: Thu Aug 22, 2024 8:54 am
I'm mixing idf and arduino.
First, I'm not familiar with concepts like usb-jtag/openocd. I wanted the esp32c3 to get configuration input from the serial tool, but once I used Serial.begin (Serial1.begin as well), the logs I output with log_x could not be displayed in the console (idf monitor). They seemed to be mutually exclusive. finally, I used idf's uart_driver_install to initialize gpio20,21 as UART_NUM_1.
This works and does not affect my log_x output, but then I need an extra connector to connect to this uart1. I tried usb_serial_jtag_read_bytes, but because there is no process like usb_serial_jtag_driver_install, this produced an exception.
The document records very few details, and it seems that reading data through usb is possible:
Bidirectional serial console, which can be used with IDF Monitor or another serial monitor.
Finally, I was very confused. gpio20, gpio21 are shown as u0rx, u0tx in the datasheet, but it allows me to initialize them as uart1. I was completely confused.
First, I'm not familiar with concepts like usb-jtag/openocd. I wanted the esp32c3 to get configuration input from the serial tool, but once I used Serial.begin (Serial1.begin as well), the logs I output with log_x could not be displayed in the console (idf monitor). They seemed to be mutually exclusive. finally, I used idf's uart_driver_install to initialize gpio20,21 as UART_NUM_1.
This works and does not affect my log_x output, but then I need an extra connector to connect to this uart1. I tried usb_serial_jtag_read_bytes, but because there is no process like usb_serial_jtag_driver_install, this produced an exception.
The document records very few details, and it seems that reading data through usb is possible:
Bidirectional serial console, which can be used with IDF Monitor or another serial monitor.
Finally, I was very confused. gpio20, gpio21 are shown as u0rx, u0tx in the datasheet, but it allows me to initialize them as uart1. I was completely confused.