2025-12-23 11:43 AM
I've noticed a behavior with MX25UM5124G_STM32U5x9K-DK External loader over the past 2 years that I feel is a bug. I think the bug lies within the sectorwise erase of the MX25UM5124G_STM32U5x9K-DK External loader fw.
If you flash a bin to external flash using the external loader with "erase before programming" enable , there is near 100% likelihood the verification step will fail. I believe this caused by the sectorwise erase not working as intended. The work around has been to do full chip erase on external flash then attempt the flash again. This will succeed almost every time.
The behavior that led me to suspect the issue lies within the external loader is when I wrote a proprietary external flasher onboard the stm32. It uses sectorwise erase and has high reliability. This proves to me that flash chip and flash driver on the STM32 are working as intended. Note: We use this proprietary flasher for customer flashing updates but still use Cubeprogrammer for development and at our factory so we cant just use the proprietary flasher all the time.
In summary:
- Cubeprogrammer External loader Full chip erase - works
- Proprietary External flasher sectorwise erase - works
- Cubeprogrammer External loader sectorwise erase - does not work
Thanks,
Daniel