ESP32S3 USB/Serial

I have a USB FTDI device, how can I use it using the GPIO19 (USB_D-) and GPIO20 (USB_D+) ports which are the USB ports on the ESP32S3 for USBserial/JTAG?

what is the specific USB FTDI device, e.g. a ttl-232r-3v3
also which ESP32-S3 dev kit are you using?

Hy Horace, yes a common FTDI ttl-232 5v i put there um USB-OTG mode, and try CDC mode to, but no success, the model is ESP32-SE-WROOM-1

to clarify - the ESP32-S3-DevKitC-1 has two USB ports

  1. COM - used to communicate with PC host for programming and Serial Monitor communications
  2. USB - supports USB OTG host and device

you wish to connect the FTDI TTL-232-5V to the USB port to provide serial communication to an external device
the USB port acts as a OTG host and you will write a USB device driver to drive the FTDI-232-5V

any particular reason to use the FTDI-232-5V for serial communications?
why not use one of the ESP32 hardware serial ports Serial1 or Seial2
e.g. program using Serial1 on pins 16 and 17

// ESP32  Serial1 test - for loopback test connect pins 16 and 17

#define RXD1 16
#define TXD1 17

void setup() {
  // initialize both serial ports:
  Serial.begin(115200);
  //Serial1.begin(115200, SERIAL_8N1, RXD1, TXD1);
  Serial1.begin(38400, SERIAL_8N1, RXD1, TXD1);
  Serial.println();
  Serial.println("\n\nESP32 serial1  test Rx pin 16 Tx pin 17");
  Serial.write("   for loopback test connect pin 16 to pin 17\n");
}

void loop() {
  // read from port 1, send to port 0:
  if (Serial1.available()) {
    int inByte = Serial1.read();
    Serial.write(inByte);
  }

  // read from port 0, send to port 1:
  if (Serial.available()) {
    int inByte = Serial.read();
    //Serial.write(inByte);
    Serial1.write(inByte);
  }
}

if I connect pins 16 and 17 of the ESP32-S3 it forms a loopback
a test run gives - I entered "test 1234567890" and "test abcdef" on the keyboard and serial monitor displays

SP32 serial1  test Rx pin 16 Tx pin 17
   for loopback test connect pin 16 to pin 17
test 1234567890
test abcdef

remember the ESP32 uses 3.3V logic - if connectng to a device which uses 5V logic use a potential divider or level converter to convert the 5V levels to 3.3V

Hi Horace, sorry for the delay, my problem is a little more complex than the free choice between ports... following:

I have an ESP32-S3 on a PCB (for specific use), using port 18 (RX), 17 (TX) as indicated in the official pinouts, simply the RX does not return data, at the same time a logic analyzer shows me that between the external device and the SP32-S3 serial are indeed transferring data, but through the ESP32-S3 I cannot read or manipulate the data, I have tried all possible ways. Everything indicates that there is a problem with this external interface.

External interface [TTL] <--> [TTL] ESP32-S3

This interface also has an FTDI USB TTL version, my idea is to test if this way I can solve this problem, through this change of ports,

I bought a market standard ESP32-S3 MCU, everything works normally, reaffirming that my first piece of hardware has indeed some issues.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.