STM32加密问题:怎样预置一段Flash读保护和清除读保护的程序?

2019-03-23 19:49发布

怎样预置一段Flash读保护和清除读保护的程序?谢谢 此帖出自小平头技术问答
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
2条回答
fuqing5542
2019-03-24 03:37
/ 哈哈找到了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();
        }
}

一周热门 更多>