怎样预置一段Flash读保护和清除读保护的程序

[复制链接]
1433|1
 楼主| tianli1980 发表于 2013-12-23 10:41 | 显示全部楼层 |阅读模式
STM32加密问题:怎样预置一段Flash读保护和清除读保护的程序 ?哈哈,找到了:
void Check_Flash(void)
{
           FlagStatus status = RESET;
        status = FLASH_GetReadOutProtectionStatus();
        if(status != SET)
        {
                FLASH_Unlock();  /* Flash 解锁 */
                /* ENABLE the ReadOut Protection */
                FLASH_ReadOutProtection(ENABLE);          //读保护使能
                FLASH_EnableWriteProtection(FLASH_WRProt_AllPages);  //写保护使能
                Reset_System();
        }
}
mmuuss586 发表于 2014-4-21 09:14 | 显示全部楼层
找到就好
您需要登录后才可以回帖 登录 | 注册

本版积分规则

482

主题

2214

帖子

11

粉丝
快速回复 在线客服 返回列表 返回顶部