I am having problems with the C6 dropping the com port connection with Arduino after manual reset which is required after download a compiled code. The com port is lost for 18 seconds but the code execution is started immediately. By the time the serial port connection is re-established by the C6, it is now well inside the main loop(). I cannot see what is happening in the setup() which is crucial for code execution analysis. As a result of this problem, I had to remove it from my current project pending resolution of the issue. Has anyone experience this issue with the C6? I am using Arduino 2.3 running on Windows 11. The CDC is turned on.
I have submitted a technical request about this problem a week ago but still have not received any feedback. This is my second attempt at presenting this problem to this group to see if anyone has had a similar issue and what the solution was for this problem. I did not see my first attempt with asking for help in this group.
I’d suspect when reset is pressed it’s tripping windows to re-enumerate the device
If waiting the 18 seconds in general is not an issue, you could add a delay that awaits usb enumeration like
void setup() {
// Wait for Serial connection (up to 10 seconds)
Serial.begin(115200);
unsigned long start = millis();
while (!Serial && (millis() - start < 10000)) {
delay(100); // Yield to allow USB enumeration
}
Or some other form of a long-ish delay
I realize I can put delays at the start but that is not fixing the problem, that is just compensating for something which should not need compensating. Thus far, I have used 4 different ESP’s on 3 different projects under the same Windows 11 computer and using the same Arduino. One was the C6, one was a C5, one was a plain ESP32 and the last was a S3. All of the ESPs were from different manufactures with the C6 from SparkFun. None of the other ESP’s had issues with dropping the com port and that is with running the same program on the same computer under the same Arduino.
I pulled the C6 off the shelf and hooked it up via Arduino then opened device manager and watched the com ports. Sure enough, when I pressed the reset button, the C6 dropped off the com per the Device manager. As you stated, it may have something to do with one of the many recent Windows 11 software updates though I do not know why it is not affecting the other ESP’s. I am assuming no one is having problems with the Sparkfun’s non-C6 ESPs. Could be some compatibility issues with the recent Windows 11 update vs the new core used in the C6. That level of understanding is way beyond my pay grade. Thank you for your help.
It is not uncommon for high powered (fast) ESPs to process commands quicker and wanting to use the Serial before the Serial.begin() can fully boot, thus the need to wait and give Serial.begin() time to boot. Personally I do not use (!Serial) because most of the time the ESP’s I use are not connected to any serial port and the (!Serial) would end up stuck in an endless loop. I just put a simple delay(). Works every time for me.