r/esp32 • • 15d ago

Hardware help needed ESP32-C3: does `app-flash` preserve XMC flash write-protection on reboot?

Hi all!

I’m developing an ESP-IDF game for a FoloToy AI Passport. The board uses native USB Serial/JTAG and has 8 MB of XMC flash (JEDEC \`20 40 17\`) with one factory app partition. The current app boots normally.
An earlier app-only update with \`esptool\` 4.13.0 in ROM mode succeeded: the app read back correctly and booted. I didn’t record the flash write-protection settings before and after. A newer custom installer stopped before writing:

STOP: Unreviewed NOR protection layout for JEDEC 174020; no write

That message came from my installer’s safety check, not from Espressif’s tool. \`174020\` is the same flash ID shown in reverse byte order. No new firmware was written.

I’ve read \[FoloToy’s build guide\]([https://github.com/FoloToy/ai-passport/blob/main/docs/development/engineering/build-and-test.md\](https://github.com/FoloToy/ai-passport/blob/main/docs/development/engineering/build-and-test.md)) and \[hardware guide\]([https://github.com/FoloToy/ai-passport/blob/main/docs/hardware-design/AI\\_HARDWARE\\_DEVELOPMENT\\_GUIDE.md\](https://github.com/FoloToy/ai-passport/blob/main/docs/hardware-design/AI_HARDWARE_DEVELOPMENT_GUIDE.md)), and \[Espressif’s docs for \`app-flash\`\]([https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-guides/tools/idf-monitor.html#keyboard-shortcuts\](https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-guides/tools/idf-monitor.html#keyboard-shortcuts)).

These explain what gets flashed, but I haven’t found a report showing whether write-protection stays unchanged on this board.

Has anyone tested an app-only update on this setup and checked the flash protection before connecting the flasher and again after a normal reboot?

If so, which ESP-IDF or \`esptool\` version did you use, and did you confirm the flash variant (XM25QH64C or XM25QH64D)?

I’m trying to replace only the app and keep the existing bootloader, partition table and saved settings. I don’t want to disable protection or force a write. Thanks!

3 Upvotes

2 comments sorted by

•

u/AutoModerator 15d ago

Hardware Troubleshooting Notice: If you are experiencing unreliable connections, boot loops, or missing serial communication, verify your hardware footprint:

  1. Are your headers soldered? Pushing un-soldered raw header pins through module vias into a breadboard violates basic physics. Loose connections create parasitic capacitance and intermittent open circuits. Solder your board.
  2. Did you include a schematic? Custom circuit issues require a legible schematic drawing.

If your hardware relies on putty, tape, or friction, please resolve your connections before demanding assistance from our domain experts.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/xiaoqi668 15d ago

Standard esptool app-flash doesn't touch the flash status register protection bits unless you explicitly issue register commands, so any non-volatile BP/WP bits stay intact across reboots. As for telling XM25QH64C vs D apart when both return 20 40 17, you usually have to dump the SFDP table or check status register behavior—a lot of custom flashers bail on 20 40 17 simply because multiple XMC revisions share that JEDEC ID.