Custom Board Flashing issue

buddika79
Posts: 3
Joined: Wed Aug 09, 2023 7:23 pm

Custom Board Flashing issue

Postby buddika79 » Fri Aug 02, 2024 9:51 pm

I made a custom board with ESP32-U4WDH. I get the following error when I try to flash using VSCode. I use ESP-PROG to program it.
https://www.digikey.com/en/products/det ... G/10259352
error.jpg
error.jpg (226.33 KiB) Viewed 2341 times
Schematic is shown below.
schematic.png
schematic.png (289.1 KiB) Viewed 2341 times
I have some resistors in my board that pull up IO2, IO4, IO25 and IO26 to 3.3V. I removed all of these so that those IOs are floating. Then I could flash my board.
The question is I am making this board for a commercial application and I need those pull up resistors for I2C communication. So, in my final board not having those resistors for programming is not an option. Can you please tell me if there is anything wrong in my design and how can I fix it.

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: Custom Board Flashing issue

Postby ESP_Sprite » Sat Aug 03, 2024 1:01 am

You seem to be using the SD_* pins for stuff. The internal flash is connected to that. Per the datasheet, you should leave those pins unconnected.

buddika79
Posts: 3
Joined: Wed Aug 09, 2023 7:23 pm

Re: Custom Board Flashing issue

Postby buddika79 » Tue Aug 27, 2024 3:33 am

Thank you very much for the reply. I removed all the components connected to the SD_* pins. Few of those pins go to two connectors which is not connected to anything. But I still have the flashing issue.

But if I remove the 10K pull - up resistors connected to IO_2, IO_4, IO_25 AND IO_26 I can flash the board. Please see the schematic below.
schematic.png
schematic.png (166.05 KiB) Viewed 1728 times
Here is the error message I get. I greatly appreciate if you can help solve this.

====================================================================================================

* The terminal process "C:\Users\chang\.platformio\penv\Scripts\platformio.exe 'run', '--target', 'upload'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.

* Executing task in folder m5_test01: C:\Users\chang\.platformio\penv\Scripts\platformio.exe run --target upload

Processing esp32doit-devkit-v1 (platform: espressif32; framework: arduino; board: esp32doit-devkit-v1)
-------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards ... it-v1.html
PLATFORM: Espressif 32 (6.7.0) > DOIT ESP32 DEVKIT V1
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 @ 3.20016.0 (2.0.16)
- tool-esptoolpy @ 1.40501.0 (4.5.1)
- tool-mkfatfs @ 2.0.1
- tool-mklittlefs @ 1.203.210628 (2.3)
- tool-mkspiffs @ 2.230.0 (2.30)
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 34 compatible libraries
Scanning dependencies...
Dependency Graph
|-- SparkFun VL6180 Sensor @ 1.1.3
|-- Wire @ 2.0.0
Building in release mode
Retrieving maximum program size .pio\build\esp32doit-devkit-v1\firmware.elf
Checking size .pio\build\esp32doit-devkit-v1\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 6.7% (used 21800 bytes from 327680 bytes)
Flash: [== ] 21.9% (used 287625 bytes from 1310720 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, esp-bridge, esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Using manually specified: COM11
Uploading .pio\build\esp32doit-devkit-v1\firmware.bin
esptool.py v4.5.1
Serial port COM11
Connecting..............
Chip is ESP32-U4WDH (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: cc:7b:5c:84:0b:bc
Uploading stub...
Running stub...
Stub running...
WARNING: Failed to communicate with the flash chip, read/write operations will fail. Try checking the chip connections or removing any other hardware connected to IOs.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x00056fff...
Compressed 17536 bytes to 12202...
Writing at 0x00001000... (100 %)

A fatal error occurred: Serial data stream stopped: Possible serial noise or corruption.
*** [upload] Error 2
============================================================= [FAILED] Took 17.36 seconds =============================================================

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: Custom Board Flashing issue

Postby ESP_Sprite » Sun Sep 22, 2024 6:48 am

buddika79 wrote:
Tue Aug 27, 2024 3:33 am
WARNING: Failed to communicate with the flash chip, read/write operations will fail. Try checking the chip connections or removing any other hardware connected to IOs.
Nope. This still indicates an issue communicating with the flash.

Who is online

Users browsing this forum: Bing [Bot], slaboure and 116 guests