Cannot run sketches on my ESP32S3 N16R8 anymore

Hello,

I was able to run my sketches on an ESP32S3 Dev module, but that stopped working at some point.
I suspected that I might have modified my configuration somehow by using the tools menu.
So I tried playing around with that, based on what I found googling this issue.
But I did not find a solution.
Then I suspected a hardware issue. So I downloaded the ESP-IDF CLI suite from Espressif. I managed to run their "Hello world" example with that. So the hardware seems ok.

The Arduino sketch I now use to get the ESP32S3 going again is very basic:

void setup() {
      Serial.begin(115200);
      while (!Serial.available());
 
      Serial.println("Starting...");
}

void loop() {
      Serial.println("Looping");
      delay(2000);
}

It uploads fine (see the information below). But it just won't run.

Sketch uses 298289 bytes (22%) of program storage space. Maximum is 1310720 bytes.
Global variables use 18496 bytes (5%) of dynamic memory, leaving 309184 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.6
Serial port /dev/cu.wchusbserial585A0804781
Connecting...
Chip is ESP32-S3 (revision v0.2)
Features: WiFi, BLE
Crystal is 40MHz
MAC: 3c:84:27:c8:5e:84
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00003fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x00058fff...
Compressed 13744 bytes to 9822...
Writing at 0x00000000... (100 %)
Wrote 13744 bytes (9822 compressed) at 0x00000000 in 0.4 seconds (effective 305.1 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 146...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.1 seconds (effective 374.6 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 553.0 kbit/s)...
Hash of data verified.
Compressed 298656 bytes to 168540...
Writing at 0x00010000... (9 %)
Writing at 0x0001c133... (18 %)
Writing at 0x000242d9... (27 %)
Writing at 0x00029b75... (36 %)
Writing at 0x0002f25a... (45 %)
Writing at 0x000346e4... (54 %)
Writing at 0x00039fb5... (63 %)
Writing at 0x000433f5... (72 %)
Writing at 0x0004c2bb... (81 %)
Writing at 0x000519f1... (90 %)
Writing at 0x00057191... (100 %)
Wrote 298656 bytes (168540 compressed) at 0x00010000 in 2.6 seconds (effective 920.5 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin

The board I selected is "ESP32S3 Dev Module". The setting in the tools menu is

The only thing I see on the serial monitor is the following:

13:48:26.720 -> Build:Mar 27 2021
13:48:26.720 -> rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
13:48:26.720 -> SPIWP:0xee
13:48:26.720 -> mode:DIO, clock div:1
13:48:26.720 -> load:0x3fce3818,len:0x438
13:48:26.720 -> load:0x403c9700,len:0x4
13:48:26.720 -> load:0x403c9704,len:0x9ac
13:48:26.720 -> load:0x403cc700,len:0x2764
13:48:26.755 -> entry 0x403c9868

Any advise or suggestions are very much appreciated.

Welcome to the forum

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the < CODE/ > icon above the compose window) to make it easier to read and copy for examination

https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum

In my experience the easiest way to tidy up the code and add the code tags is as follows

Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.

Thanks for your advice.
I saw I missed a piece of code that was unformatted.
I corrected this now.

Greetings,

Cor.

Try your sketch in post #1 but using Serial0 instead of Serial.

The native port uses Serial and the UART port (if your board has it) uses Serial0.

My first "is it toast or still working" test is blink without delay. If the board doesn't have a simple LED I use a discrete LED with a resistor on whatever pin seems the "safest"

My board has indeed two USB connectors. I will try the Serial0 to see if I can get the Arduino upload working again. I will post the results. Note that the prints itself are not the goal, but only a way to check if it runs or not with Arduino.

Currently a "Hello world" example using the bare, CLI based, ESP-IDF suite will run perfectly. So the ESP32S3 Devkit-1 board itself is ok. It something in the Arduino environment causing it to malfunction. Looked into the tools menu and the setup of the board.

Below is the output of that program

09:54:54.623 -> e[0;32mI (31) boot: ESP-IDF v5.2.2 2nd stage bootloadere[0m
09:54:54.623 -> e[0;32mI (31) boot: compile time Jul  8 2024 17:38:57e[0m
09:54:54.623 -> e[0;32mI (31) boot: Multicore bootloadere[0m
09:54:54.623 -> e[0;32mI (34) boot: chip revision: v0.2e[0m
09:54:54.655 -> e[0;32mI (38) boot.esp32s3: Boot SPI Speed : 80MHze[0m
09:54:54.655 -> e[0;32mI (43) boot.esp32s3: SPI Mode       : DIOe[0m
09:54:54.655 -> e[0;32mI (48) boot.esp32s3: SPI Flash Size : 16MBe[0m
09:54:54.655 -> e[0;32mI (52) boot: Enabling RNG early entropy source...e[0m
09:54:54.655 -> e[0;32mI (58) boot: Partition Table:e[0m
09:54:54.655 -> e[0;32mI (61) boot: ## Label            Usage          Type ST Offset   Lengthe[0m
09:54:54.688 -> e[0;32mI (69) boot:  0 nvs              WiFi data        01 02 00009000 00006000e[0m
09:54:54.688 -> e[0;32mI (76) boot:  1 phy_init         RF data          01 01 0000f000 00001000e[0m
09:54:54.688 -> e[0;32mI (84) boot:  2 factory          factory app      00 00 00010000 00100000e[0m
09:54:54.688 -> e[0;32mI (91) boot: End of partition tablee[0m
09:54:54.688 -> e[0;32mI (95) esp_image: segment 0: paddr=00010020 vaddr=3c020020 size=0b0b8h ( 45240) mape[0m
09:54:54.721 -> e[0;32mI (112) esp_image: segment 1: paddr=0001b0e0 vaddr=3fc92700 size=029ach ( 10668) loade[0m
09:54:54.721 -> e[0;32mI (114) esp_image: segment 2: paddr=0001da94 vaddr=40374000 size=02584h (  9604) loade[0m
09:54:54.721 -> e[0;32mI (123) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=1c574h (116084) mape[0m
09:54:54.753 -> e[0;32mI (150) esp_image: segment 4: paddr=0003c59c vaddr=40376584 size=0c0ech ( 49388) loade[0m
09:54:54.753 -> e[0;32mI (167) boot: Loaded app from partition at offset 0x10000e[0m
09:54:54.786 -> e[0;32mI (167) boot: Disabling RNG early entropy source...e[0m
09:54:54.786 -> e[0;32mI (178) cpu_start: Multicore appe[0m
09:54:54.786 -> e[0;32mI (188) cpu_start: Pro cpu start user codee[0m
09:54:54.786 -> e[0;32mI (188) cpu_start: cpu freq: 160000000 Hze[0m
09:54:54.786 -> e[0;32mI (188) cpu_start: Application information:e[0m
09:54:54.786 -> e[0;32mI (191) cpu_start: Project name:     hello_worlde[0m
09:54:54.786 -> e[0;32mI (196) cpu_start: App version:      1e[0m
09:54:54.818 -> e[0;32mI (201) cpu_start: Compile time:     Jul  8 2024 17:39:16e[0m
09:54:54.818 -> e[0;32mI (207) cpu_start: ELF file SHA256:  a23997833...e[0m
09:54:54.818 -> e[0;32mI (212) cpu_start: ESP-IDF:          v5.2.2e[0m
09:54:54.818 -> e[0;32mI (217) cpu_start: Min chip rev:     v0.0e[0m
09:54:54.818 -> e[0;32mI (222) cpu_start: Max chip rev:     v0.99 e[0m
09:54:54.818 -> e[0;32mI (227) cpu_start: Chip rev:         v0.2e[0m
09:54:54.850 -> e[0;32mI (231) heap_init: Initializing. RAM available for dynamic allocation:e[0m
09:54:54.850 -> e[0;32mI (239) heap_init: At 3FC95978 len 00053D98 (335 KiB): RAMe[0m
09:54:54.850 -> e[0;32mI (245) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAMe[0m
09:54:54.850 -> e[0;32mI (251) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAMe[0m
09:54:54.850 -> e[0;32mI (257) heap_init: At 600FE010 len 00001FD8 (7 KiB): RTCRAMe[0m
09:54:54.883 -> e[0;32mI (264) spi_flash: detected chip: generice[0m
09:54:54.883 -> e[0;32mI (268) spi_flash: flash io: dioe[0m
09:54:54.883 -> e[0;32mI (272) sleep: Configure to isolate all GPIO pins in sleep statee[0m
09:54:54.883 -> e[0;32mI (279) sleep: Enable automatic switching of GPIO sleep configuratione[0m
09:54:54.883 -> e[0;32mI (286) main_task: Started on CPU0e[0m
09:54:54.883 -> e[0;32mI (296) main_task: Calling app_main()e[0m
09:54:54.917 -> Hello world!
09:54:54.917 -> This is esp32s3 chip with 2 CPU core(s), WiFi/BLE, silicon revision v0.2, 16MB external flash
09:54:54.917 -> Minimum free heap size: 384448 bytes

So it is definitely not a hardware problem.
Note also that this output is produced on the standard port which is also used for uploading.

Hi,

Thanks for your suggestion. My board has a LED on it. I have to a enable it by soldering bridge. I could enable the LED.

But I already know that the board is not toasted. I ran a bare C-program using the ESP-IDF CLI based suite of Espressif. Using the idf.py build command and the python based ESPtool to upload it. I compiled and uploaded the "Hello world" C-program. It ran perfectly. See also my reply to previous reaction of Wim43. The output is shown in there.

So it must be the setup in the Arduino IDE that is wrong somewhere. I use the ESP32 S3 Devkit board via the tools menu. Tried a lot of different setting of that board, but nothing worked. And previously it did work! So I think something in the Arduino setup has changed. But what could it be?

Is there a way to find out what the characteristics of my ESP32 S3 Devkit1 N16R8 board are? Other than just trying?

Hi all,

I have found a solution.
Instead of using the "ESP32S3 Dev Module" board, I now selected the ESP32-S3-USB-OTG board.
The tools menu looks like the picture below.

My sketch now runs. As you can see in the picture below.

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