Upload filesystem error "The chip stopped responding"

Hello,

My first post here, so apologies in advance if I forget some vital info (or provide too much :slightly_smiling_face: ).

Environment: VSC on Windows 10

Attempting to upload a filesystem to a clone? ESP32-S3 (dev kit description said its an ESP32-S3, but module is labelled ‘sparkle XH-S3E N16R8’) fails without uploading anything with a ‘The chip stopped responding’ error:

Building FS image from ‘data’ directory to .pio\build\esp32-s3-n16r8v\spiffs.bin

Successfully created SPIFFS image: .pio\build\esp32-s3-n16r8v\spiffs.bin
Looking for upload port…
Auto-detected: COM23
Uploading .pio\build\esp32-s3-n16r8v\spiffs.bin
esptool v5.1.2
Serial port COM23:
Connecting…
Connected to ESP32-S3 on COM23:
Chip type:          ESP32-S3 (QFN56) (revision v0.2)
Features:           Wi-Fi, BT 5 (LE), Dual Core + LP Core, 240MHz, Embedded PSRAM 8MB (AP_3v3)
Crystal frequency:  40MHz
USB mode:           USB-Serial/JTAG
MAC:                98:a3:16:f1:c2:28

Uploading stub flasher…
Running stub flasher…
Stub flasher running.
Changing baud rate to 921600…
Changed.

Configuring flash size…
Auto-detected flash size: 16MB
Flash will be erased from 0x00c90000 to 0x00feffff…
Compressed 3538944 bytes to 14925…

Writing at 0x00c90000 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]   0.0% 0/14925 bytes…

Hard resetting via RTS pin…
Traceback (most recent call last):
File “C:\Users\Adam.platformio\packages\tool-esptoolpy\esptool_init_.py”, line 1140, in main
main()
File "C:\Users\Adam.platformio\packages\tool-esptoolpy\esptool_init.py", line 1034, in main
cli(args=args, esp=esp)
File “C:\Users\Adam.platformio\packages\tool-esptoolpy\esptool\cli_util.py”, line 286, in call
return super().call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Adam.platformio\penv\Lib\site-packages\rich_click\rich_command.py”, line 402, in call
return super().call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Adam.platformio\penv\Lib\site-packages\click\core.py”, line 1485, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Adam.platformio\penv\Lib\site-packages\rich_click\rich_command.py”, line 216, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File “C:\Users\Adam.platformio\penv\Lib\site-packages\click\core.py”, line 1873, in invoke
return process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Adam.platformio\penv\Lib\site-packages\click\core.py”, line 1269, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Adam.platformio\penv\Lib\site-packages\click\core.py”, line 824, in invoke
return callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Adam.platformio\penv\Lib\site-packages\click\decorators.py”, line 34, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Adam.platformio\packages\tool-esptoolpy\esptool_init.py", line 691, in write_flash_cli
write_flash(ctx.obj[“esp”], addr_filename, **kwargs)
File “C:\Users\Adam.platformio\packages\tool-esptoolpy\esptool\cmds.py”, line 884, in write_flash
esp.flash_defl_block(block, seq, timeout=timeout)
File “C:\Users\Adam.platformio\packages\tool-esptoolpy\esptool\loader.py”, line 139, in inner
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Adam.platformio\packages\tool-esptoolpy\esptool\loader.py”, line 1379, in flash_defl_block
self.check_command(
File “C:\Users\Adam.platformio\packages\tool-esptoolpy\esptool\loader.py”, line 563, in check_command
val, data = self.command(op, data, chk, timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Adam.platformio\packages\tool-esptoolpy\esptool\loader.py”, line 493, in command
p = self.read()
^^^^^^^^^^^
File “C:\Users\Adam.platformio\packages\tool-esptoolpy\esptool\loader.py”, line 429, in read
return next(self._slip_reader)
^^^^^^^^^^^^^^^^^^^^^^^
StopIteration

A fatal error occurred: The chip stopped responding.
*** [uploadfs] Error 2


Source code uploads fine and runs, so not a general communications problem.

Hours scouring the Net haven’t provided any insight or solution.

platformio.ini:

[platformio]
boards_dir = boards
lib_dir = lib
src_dir = src
include_dir = include

[env:esp32-s3-n16r8v]
platform = espressif32
framework = arduino
board = esp32-s3-n16r8v
;board_build.filesystem = littlefs
board_build.filesystem = spiffs
;board_build.arduino.memory_type = qio_opi
;board_build.flash_mode = qio
;board_build.psram_type = opi
;board_upload.flash_size = 16MB
;board_upload.maximum_size = 16777216
;board_build.partions = min_littlefs.csv
monitor_filters = esp32_exception_decoder
monitor_speed = 115200
upload_speed = 921600
lib_deps = 
	moononournation/GFX Library for Arduino@^1.5.0
	lvgl/lvgl@^9.2.2
	hasenradball/DS3231-RTC@^1.1.0
	me-no-dev/ESP Async WebServer@1.2.3
;build_src_flags = -Wall -Wextra
;build_flags = 
;	-D ARDUINO_USB_MODE=1
;	-D ARDUINO_USB_CDC_ON_BOOT=1
;	-D ARDUINO_USB_MSC_ON_BOOT=0
;	-D ARDUINO_USB_DFU_ON_BOOT=0
;	-D BOARD_HAS_PSRAM

(Commented lines have been added and removed in various combinations without affecting the error.)

esp32-s3-n16r8v.json:

{
    "build": {
      "arduino":{
        "ldscript": "esp32s3_out.ld",
        "partitions": "default_16MB.csv",
        "memory_type": "qio_opi"
      },
      "core": "esp32",
      "extra_flags": [
        "-DARDUINO_ESP32S3_DEV",
        "-DBOARD_HAS_PSRAM",
        "-DARDUINO_USB_MODE=1",
        "-DARDUINO_USB_CDC_ON_BOOT=1"
      ],
      "f_cpu": "240000000L",
      "f_flash": "80000000L",
      "flash_mode": "qio",
      "psram_type": "opi",
      "hwids": [
        [
          "0x303A",
          "0x1001"
        ]
      ],
      "mcu": "esp32s3",
      "variant": "esp32s3"
    },
    "connectivity": [
      "wifi",
      "bluetooth"
    ],
    "debug": {
      "default_tool": "esp-builtin",
      "onboard_tools": [
        "esp-builtin"
      ],
      "openocd_target": "esp32s3.cfg"
    },
    "frameworks": [
      "arduino",
      "espidf"
    ],
    "platforms": [
      "espressif32"
    ],
    "name": "Espressif ESP32-S3-N16R8V (16 MB QD, 8MB PSRAM)",
    "upload": {
      "flash_size": "16MB",
      "maximum_ram_size": 327680,
      "maximum_size": 16777216,
      "require_upload_port": true,
      "speed": 921600
    },
    "url": "https://www.espressif.com/en/products/socs/esp32-s3",
    "vendor": "Espressif"
  }

(The board file was found online as part of a demo.)

It’s been a couple of years since I’ve uploaded a filesystem in platformio, and this is the first time I’ve used this particular (clone) ESP32 chip. So I don’t know whether the problem is due to the chip, or something’s broken in my platformio install.

Using SPIFFS only as I’ve used it in the past. Downloading as littlefs gave the same error.

Dev kit is described (abbreviated) as ‘ESP32-S3 IoT Development Board 3.5 inch touch screen’ and referred to as (I think) JC4832W535. Though the demo I based my code on refers to it as JC3248W535 (more confusion!).

Documentation on the sparkle module used on the dev kit is sparse and inconsistent.

Disclaimer: Though I am a professional developer, I do the minimum research necessary to get a project going, so though I have done several platformio ESP32 projects, I still consider myself a platformio n00b.

BTW +1 for PlatformIO account creation from the forum as you still haven’t restored the online create account link.

Many thanks for any assistance

reduce the esptool upload speed. esptool.py fails during upload. Yor assumption upload works correctly is wrong

I have tried slower speeds but have now discovered that it’s not respecting upload_speed: it always seems to use 921600 regardless of what upload_speed is set to.

Investing that, I found Upload_speed not respected - #6 by neogene and a verbose upload does show the platformio.ini upload_speed for the esptool –baud parameter. But I don’t understand what the ‘related file’ neogene is referring to in his last post, so can’t resolve this.