打印

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

[复制链接]
1125|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

粉丝