XAIO ESP32 C3 not recognised

This device is not recognised by widows unless

method1. Keep the BOOT button pressed and then connect to the computer via the data cable. Release the BOOT button after connecting to the computer.

method2. When you press and hold the BOOT key while powering up and then press the Reset key once, you can also enter BootLoader mode.

In a real world application this is not really practical as the buttons are not easily accessable. Why is this happening is the a solution like adding a capacitor to reset or boot if accessible.

After some investigation it appears to be code related to trying to use Serial1.

void setup() {

Serial.begin(115200);

Serial1.begin(115200);

}

This causes windows to not recognise usb port. If the port is connected then it will compile and upload and

Leaving…Hard resetting via RTS pin…

but the port disconnects

Port monitor error: command ‘open’ failed: Invalid serial port. Could not connect to COM9 serial port.

In summary leave out Serial1 and all is fine. Does any one have any thoughts / ideas to solve this

When using Serial1 you need to specify the Baud Rate, Config, RX and TX pins used.

Eg…

 Serial1.begin(256000, SERIAL_8N1, GPIO_NUM_17, GPIO_NUM_16);  // D7 = RX, D6 = TX

Hi

Yes is discovered that. I defined Serial1 with out explicity defining the RX and TX pins. What surprises me is this is not picked up by the compliation and that it causes the Serial port to be dropped.

Had something like that , i ended flashing via UART with serial dongle

Serial1 may conflict with the native USB interface. Avoid relying on default UART pin assignments.
Specify Serial1 RX and TX pins explicitly. Choose pins not shared with USB functions.
Avoid boot-related or reserved GPIOs. Check the XIAO ESP32-C3 pinout carefully. Enable USB CDC On Boot in Arduino settings.