cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429 program failed, chip locked?

ZRong.1
Associate

Hi everyone,

I built a custom board with STM32F429VIT with the following settings:

Boot0=GND, Boot1=GND

HSE=25MHz

I configured IAR project options as following:

- use-Flash-loader checked;

I am using IAR 8.10 with ST-Link-v2 (SWD) to develop the firmware. After building the hardware, I tried to download the program (from an example in CMSIS) to the board, but encountered a problem:

IAR pop up a question: 

"Do you want to perform mass erase to unlock the device?"

I choose "OK" and the loading starts but got a fatal error:

"the flash loader program reported an error".

0693W000003QeLeQAK.jpg

I googled this error and somebody mentioned this may be caused by the locked-chip. Then I checked the chip with STM32-ST-LINK-Utility, from where I can connect the target and see the Device ID and Revision-ID, but "unknown" Flash-size. I tried to "erase-chip" but failed because "chip is protected".

0693W000003QeSYQA0.png

0693W000003QeSsQAK.png

0693W000003QeTWQA0.jpg

Then I use ST-Visual-programmer to remove the protection settings in the "Option Byte".After this operation, the option-byte is as following:

0693W000003QeLiQAK.png

I tried to downlaod program via IAR again, and get another fatal error: "error while calling macro execuserflashexit". I can not find anything about this error on Google.

0693W000003QeU5QAK.png

I tried 2 boards and got the same results. What caused the chip locked? and Why does the programming failed again after removing the lock?

Any clue will be greatly appreciated.

Thanks in advance.

Best,

Zheng

0 REPLIES 0