NSPanel not flashing over UART

I have the US version of the NSPanel (The sticker on the pcb says, “E32-MSW-NX” and “p/n:WW210885 NSPanel-US”) and I am trying to flash it with ESPHome.

Flashing gets 6% of the way in, and then it fails (see the log below). The error is: A fatal error occurred: Invalid head of packet (0x78): Possible serial noise or corruption.. It tries again with 115200 (and I hit the reset button there, to get it back to the beginning of the bootloader).

I have the pins soldered in. The screen and esp32 (connected to the app) still work fine if I plug it into 5V.

Any ideas on what I can do next would be appreciated.

INFO Reading configuration /config/esphome/hallnspanel.yaml...
INFO Detected timezone 'America/Denver'
WARNING GPIO4 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
INFO Compiling app...
Processing hallnsp (board: esp32dev; framework: arduino; platform: platformio/espressif32 @ 3.5.0)
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- <WiFi> 1.0
|-- <ESPmDNS> 1.0
|-- <Update> 1.0
Compiling /data/hallnsp/.pioenvs/hallnsp/src/main.cpp.o
Linking /data/hallnsp/.pioenvs/hallnsp/firmware.elf
RAM:   [=         ]  12.6% (used 41224 bytes from 327680 bytes)
Flash: [=====     ]  46.1% (used 845266 bytes from 1835008 bytes)
Building /data/hallnsp/.pioenvs/hallnsp/firmware.bin
esp32_create_combined_bin(["/data/hallnsp/.pioenvs/hallnsp/firmware.bin"], ["/data/hallnsp/.pioenvs/hallnsp/firmware.elf"])
Wrote 0xde640 bytes to file /data/hallnsp/.pioenvs/hallnsp/firmware-factory.bin, ready to flash to offset 0x0
========================= [SUCCESS] Took 20.33 seconds =========================
INFO Successfully compiled program.
esptool.py v3.2
Serial port /dev/ttyUSB0
Connecting............................
Chip is ESP32-D0WD-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 44:17:93:7d:25:40
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00010000 to 0x000defff...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Compressed 845376 bytes to 481699...
Writing at 0x0001b233... (6 %)
A fatal error occurred: Invalid head of packet (0x78): Possible serial noise or corruption.
INFO Upload with baud rate 460800 failed. Trying again with baud rate 115200.
esptool.py v3.2
Serial port /dev/ttyUSB0
Connecting............
Chip is ESP32-D0WD-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 44:17:93:7d:25:40
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00010000 to 0x000defff...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Compressed 845376 bytes to 481699...
Writing at 0x0001b233... (6 %)
A fatal error occurred: Invalid head of packet (0x65): Possible serial noise or corruption.

Do you have io0 grounded?

1 Like

I do have IO0 grounded. I have it tied to the same ground as the Gnd, which is tied to the ftdi adapter. If I don’t do that, then it doesn’t get the 6%.

Thanks for the reply.

I ordered another ftdi adapter. :crossed_fingers:

:tada: The new FTDI adapter worked. I bought this one because it could be here next day:

1 Like