Skip to content

Commit 13bc4d1

Browse files
barbalexsclauderomasku
authored
Silabs spiflash bootloader: generic JEDEC fallback for unknown flash chips (#457)
The Gecko spiflash bootloader identifies the external SPI-NOR flash by its JEDEC id (0x9F) against a hardcoded table. A chip not in the table makes getDeviceType() return UNKNOWN_DEVICE, storage_init() then returns BOOTLOADER_ERROR_INIT_STORAGE and the application never boots -- the module is dead after flashing (#422). ZBMINIL2 ships with at least three different flash chips, so this recurs per hardware variant and currently needs a per-chip bootloader build. Add a generic fallback: when the JEDEC id is not in the table but is plausible (mfg byte not 0x00/0xFF, sane density code), serve it with a generic standard-SPI-NOR profile whose size is derived from the JEDEC density code (1 << code). The explicit table still matches first, so every already-supported chip is byte-for-byte unchanged; only previously-unhandled chips are affected. Gated by BTL_STORAGE_SPIFLASH_GENERIC_JEDEC (default on; set 0 to require an explicit table match). Tested on a real ZBMINIL2 whose Giantec GT25Q80A (JEDEC C4 60 14) is not in the table: with this bootloader the module boots and rejoins the Zigbee network, where before it was dead after flashing. Refs #422 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Roman Skurikhin <romasku135@gmail.com>
1 parent 0c8bc30 commit 13bc4d1

6 files changed

Lines changed: 1381 additions & 1238 deletions

File tree

0 commit comments

Comments
 (0)