ST-LINK Utility + ST LINK+ STM32G474 erase chip fails
今天遇到个诡异的问题,用ST-LINK Utility修改STM32G4XX的option byte 和下载程序时,突然发现MCU flash里的内容全为0..
并且用full chip erase 功能的时候报错:
17:04:55 : The elf loader Mass Erase function fails. 17:04:55 : Error occured during flash mass erase!
尝试过修改SWD的速率从4M->1.8M,没效果;
分析感觉像是flash内容被保护了,同时搜老外论坛,发现有这么一段话:
-
(Community Member) Edited April 20, 2021 at 9:28 AM Related probl the device was in level 0 but ST Link report the message "The elf loader Mass Erase function fails". Setted the Red Out Protection from level 0 to level 1 than to level 0, checking the flag PCROP_RDP in the Option bytes page problem solved
尝试修改:
1. 先将 read out protection 修改为level 1, PCROP_RDP置为1,点apply:
2. 修改read out protection 为 level 0 , 点apply
问题解决。
但感觉像是写Option byte的时候发生了错误,但回读Option byte似乎也没发现问题,比较奇怪的一点,特此记录一下。
