2020-09-03 02:22 AM
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".
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".
Then I use ST-Visual-programmer to remove the protection settings in the "Option Byte".After this operation, the option-byte is as following:
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.
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