Technical Support

MCBSTM32: STM32 FLASH OPTION BYTES PROGRAMMING FAILS


Information in this knowledgebase article applies to:

  • RealView MDK V3.20d
  • MCBSTM32 Evaluation Board

QUESTION

I use the Flash Option bytes of the STM32 devices. But if I download my application to Flash ROM, µVision reports the error Flash Download failed - "Cortex-M3". It seems that my application is programmed correctly but not the Flash Option bytes. How can I solve this error?

ANSWER

Please select the Erase Sectors option rather than Full Chip Erase option, under Cortex-M Target Driver Setup - Flash Download as the erase method when downloading to Flash.

The Full Chip Erase option programs the RDP Key (part of the Flash Option bytes) and disables Flash protection. Because of this, it is not possible to program the Flash Option bytes when the Full Chip Erase option is selected.

Full Chip Erase is intended to recover a protected Flash and will execute automatically when Erase is invoked from the Flash menu. When Download is invoked from the Flash menu, then the erase method selected configured in the Flash Download Setup - Download  Function is used.

MORE INFORMATION

SEE ALSO

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Thursday, March 19, 2009


Did this article provide the answer you needed?
 
Yes
No
Not Sure