Flash Write Error: Possible serial noise.
Posted: Wed Jun 12, 2024 12:25 am
Hi All,
I inherited an untested target board for a new design that contains an ESP32-U4WDH. It was originally designed with a different ESP32, and not all corrections were made, but I've modified it to comply with the requirements stated on the ESP32 online "Schematic Checklist." I'm using VS Code with ESP-IDF in Windows 11. I started with a simple program derived from a Blink example. It programs an runs successfully on an ESP32 DevKit V1. When I try to upload it to the ESP32-U4WDH on the target board via UART, I get the following output on the terminal:
[Codebox] * Executing task in folder blink: C:\Users\rvice\.espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:\Users\rvice\esp\esp-idf\components\esptool_py\esptool\esptool.py -p COM8 -b 115200 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x1000 bootloader/bootloader.bin 0x10000 blink.bin 0x8000 partition_table/partition-table.bin
esptool.py v4.7.dev3
Serial port COM8
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:0c:48
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00007fff...
Flash will be erased from 0x00010000 to 0x0003cfff...
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 26640 bytes to 16683...
Writing at 0x00007690... (100 %)
A fatal error occurred: Serial data stream stopped: Possible serial noise or corruption.[/Codebox]
I've scoured the web and tried a lot of different things to resolve the issue, but nothing has helped.
Here are a few things I've tried:
1. Reduce BAUD rate.
2. Different USB cable and bridge.
3. Used Arduino IDE in addition to VS Code.
I know the power supply is clean. I've put a scope and logic anaylzer on TXD and RXD and see that the signals are pretty clean. The ESP32-U4WDH sends the appropriate output stream over TXD at power up.
Here's what the TXD output stream looks like at powerup and just after taking IO0 low:
Where can I find the script that is running the pgm tool? I'd like to see exactly what's happening after programming that first section of memory that shows 100%. Normally I would see how many bytes were written and that the Hash has been verified. Where is the script that streams that info?
Can anyone point me in a direction on this?
Thanks,
robin
I inherited an untested target board for a new design that contains an ESP32-U4WDH. It was originally designed with a different ESP32, and not all corrections were made, but I've modified it to comply with the requirements stated on the ESP32 online "Schematic Checklist." I'm using VS Code with ESP-IDF in Windows 11. I started with a simple program derived from a Blink example. It programs an runs successfully on an ESP32 DevKit V1. When I try to upload it to the ESP32-U4WDH on the target board via UART, I get the following output on the terminal:
[Codebox] * Executing task in folder blink: C:\Users\rvice\.espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:\Users\rvice\esp\esp-idf\components\esptool_py\esptool\esptool.py -p COM8 -b 115200 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x1000 bootloader/bootloader.bin 0x10000 blink.bin 0x8000 partition_table/partition-table.bin
esptool.py v4.7.dev3
Serial port COM8
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:0c:48
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00007fff...
Flash will be erased from 0x00010000 to 0x0003cfff...
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 26640 bytes to 16683...
Writing at 0x00007690... (100 %)
A fatal error occurred: Serial data stream stopped: Possible serial noise or corruption.[/Codebox]
I've scoured the web and tried a lot of different things to resolve the issue, but nothing has helped.
Here are a few things I've tried:
1. Reduce BAUD rate.
2. Different USB cable and bridge.
3. Used Arduino IDE in addition to VS Code.
I know the power supply is clean. I've put a scope and logic anaylzer on TXD and RXD and see that the signals are pretty clean. The ESP32-U4WDH sends the appropriate output stream over TXD at power up.
Here's what the TXD output stream looks like at powerup and just after taking IO0 low:
Where can I find the script that is running the pgm tool? I'd like to see exactly what's happening after programming that first section of memory that shows 100%. Normally I would see how many bytes were written and that the Hash has been verified. Where is the script that streams that info?
Can anyone point me in a direction on this?
Thanks,
robin