Common MCU Flash Issue


Flash memory is an integrated on-chip function with most Microcontrollers (MCU) and is a non-volatile storage medium. Sometime you may experience flash issues that seem difficult to solve because of unexpected error cases. The followings tips may help to resolve some more common flash issues.

Issue may come from Solutions
(1) Power supply voltage interruption or loss (i) Check whether the connection to your MCU is good
(ii) Ensure the power supply is working properly
(iii) Keep the MCU away from EMI and ESD sources
(2) Violation of system frequency Check whether the operating voltage and frequency are within the MCU’s specification
(3) Violation of supply voltage required for flash programming (i) Ensure the supply voltage is stable in programming
(ii) Check whether any abnormal change of programming error bit (if the MCU specifies this)
For examples, some TI MSP430 MCU devices generate a VPE bit when supply voltage changes significantly during programming. This bit can indicate an invalid result and help to debug supply voltage related flash issues.
(4) Invalid clock provided to flash timing generator (i) Check whether the clock is suited to the flash controller or if it’s out of spec
(ii) Correctly dividing the source clock by the frequency requirements in the datasheet
(5) Unexpected erases (i) Follow the flash segment boundaries when allocating memory
(ii) If possible, save the data to RAM before erasing
(6) Programming tool cannot recognize the device (i) Update to the latest firmware for the tool application
(ii) Check your hardware connection

Here’s a related article that can help you better understand how to debug flash issue on Microcontrollers.
TI article: Debugging Flash Issues on the MSP430™ Family of Microcontrollers