Open riywo opened 1 month ago
cc @pillo79
@riywo thanks for the detailed report! We will try to investigate and let you know.
@pillo79 Please let me know if any more data you need from my board for your further investigation. This issue is pretty annoying to me as I can't run my sketch on Arduino Nano ESP32 without USB serial connection (USB battery won't work). I really want to workaround this issue.
BTW, the reason why I want to use v3.0 is the new I2S library. It's cool!
Another finding if it helps: I tried to use 5V VIN today.
So, by this way, I could use this board without USB serial somehow (Power on 5V VIN, plug USB serial then unplug). Hope this helps the investigation...
Thanks for these updates! I see you are referring to multiple ways of powering the board - does this issue happen also in the simplest case, with a Blink sketch and no electronics attached except for the USB-C cable powering the board? If this is true I would concentrate on this situation since it is much easier to replicate.
I tried to do so in Linux using IDE 2.3.2
, ESP32 core rev 3.0.2
and FQBN esp32:esp32:nano_nora
, but I could not: a single "Upload with programmer" here does result in a correct flash and the DFU works just after the first reset (so it would have been detected as your COM12, if I understand correctly).
I am not very skilled in Windows issues. I have escalated this internally so someone can try and replicate on a Windows machine. We haven't yet completed these tests for 3.0, so for the time being we still advise Nano ESP32 users to hold on 2.0.x (2.0.17 will soon be released!) for stability. But thanks for being on the bleeding edge and providing feedback!
@pillo79 Thank you for your investigation! Yes, it happens with the simplest case:
esp32:esp32:nano_nora
, too)esptool.py v4.6
Serial port COM11
Chip is ESP32-S3 (revision v0.2)
Features: WiFi, BLE
Crystal is 40MHz
I have Raspberry Pi 5, so let me try Linux later!
and if you then do a normal upload from IDE?
@JAndrassy Thank you for the suggestion. It can't upload through COM11 because "USB DFU" isn't working properly? (I can't see something like "2-5 USB DFU" with COM11 while there is with COM12):
Sketch uses 325557 bytes (10%) of program storage space. Maximum is 3145728 bytes.
Global variables use 30696 bytes (9%) of dynamic memory, leaving 296984 bytes for local variables. Maximum is 327680 bytes.
dfu-util 0.11-arduino4
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
No DFU capable USB device available
Failed uploading: uploading error: exit status 74
Arduino IDE 2 doesn't support ARM, so I couldn't try Linux on Raspberry Pi. Thus, I tried macOS Apple Silicon instead. In summary, it worked well, so the problem looks like happening only on (my) Windows.
/dev/cu.usbmodem112101 (ESP32 Family Device)
/dev/cu.usbmodem744DBDA24DA42 (Arduino Nano ESP32)
showed upand on Windows you can do a normal upload to COM12 after you uploaded Blink with esptool?
Sure as long as COM12 is active. The problem is that whenever I press RST or reconnect USB-C cable, it goes back to COM11 and I need to enable Bootloader-mode (press RST twice) that activates COM12 then I need to re-upload the same sketch again.
after the reset/reconnect normal upload to COM11 doesn't work?
No, never. COM11 can only work with ROM Boot Mode but normal upload won't work.
I see the same problem on my Win11 computer using the Arduino IDE 2.3.2 and both a Nano ESP32 and a Waveshare clone of the Nano ESP32 (a Waveshare ESP32-S3-Nano) and version 3.0.3 of the Espressif esp32 board manager.
If I configure the board to use the Arduino ESP32 Boards version 2.0.13 board manager then I do not see this problem.
I used the standard 'Blink' sketch with an added Serial.println statement:
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(115200);
delay(2000);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
Serial.println("Here");
}
I am using a 'bare' Arduino Nano ESP32 with no additional circuitry. I am using the Arduino IDE 2.3.2 on a Windows 11 computer.
Arduino ESP32 Boards by Arduino:
Compile and (normal) upload with the board set to 'Arduino Nano ESP32' using the 'Arduino ESP32 Boards' version 2.0.13
Compiles and uploads OK, flashes LED and prints 'Here' every two seconds.
Press reset and the board disconnects briefly then reconnects and works the same as in 1.
Disconnect and reconnect the USB cable and the board restarts and works the same as in 1.
Redo the compile and upload without going into boot mode and, again, it works the same as in 1.
All as expected.
esp32 boards by Espressif:
Compile and upload with the board set to 'Arduino Nano ESP32' using the 'esp 32 boards' version 3.0.3
Compiles and (normal) uploads OK, flashes LED and prints 'Here' every two seconds.
Press reset and the board disconnects and stays disconnected, LED flashes but no serial prints. Notifications say: Port monitor error: command 'open' failed: Serial port not found. Could not connect to COM4 serial port. Compile and upload now fails with: No DFU capable USB device available Failed uploading: uploading error: exit status 74
(I needed to double press the reset button to get it to compile and upload.) Disconnect and reconnect the USB cable and the board restarts, the LED flashes but, again, it fails to connect so there are no serial prints. Same notifications as in 2. Again, I need to double press the reset button to go into boot mode before I can compile and upload again.
Board
Arduino Nano ESP32
Device Description
Vanilla Arduino Nano ESP32
Hardware Configuration
No GPIO
Version
v3.0.2
IDE Name
Arduino IDE
Operating System
Windows 11
Flash frequency
?
PSRAM enabled
no
Upload speed
115200
Description
I tried to use v3.0.2 of esp32 board manager with Arduino Nano ESP32 but it couldn't keep the correct serial port. Let me describe the repro steps (I'm using Arduino IDE):
The only way to work with v3.0.2 is entering Bootloader-mode, then COM12 (Arduino Nano ESP32, Arduino Nano ESP32) is showed up. Once I upload the same sketch without Programmer, serial output works. However, when I press RST button, COM12 is gone and COM11 is back. In other words, the workaround is that using Bootloader-mode whenever I reset the board, that is insane.
This behavior only happens with v3.0 of esp32, though. I checked v2.0.17 of esp32, then RST button correctly keeps COM12 and the serial port is working. Same as the Arduino's Arduino ESP32 Boards, RST keeps COM12.
Sketch
Debug Message
Other Steps to Reproduce
Note: When I use Blink sketch, LED properly blinks after RST even though the serial port is wrong (COM11).
Note: When the correct port is showed up (i.e. after uploading with Bootloader-mode), physically reconnecting USB cable still remains the correct port (COM12). However, once I press RST button, it never goes back to COM12 even after reconnecting USB cable again. Bootloader-mode is the only way to recover. => Update: The first half isn't true. It sometimes changes to the wrong port by just reconnecting USB cable.
Note: Also, re-uploading a new sketch when the correct port is showed up doesn't change the serial port. Only pressing RST button triggers this problematic behavior.
I have checked existing issues, online documentation and the Troubleshooting Guide