STM32Cube_FW_F4_V1.21.0 运行下面程序就死机
2019-12-17 21:30发布
打开微信“扫一扫”,打开网页后点击屏幕右上角分享按钮
- void Flash_DisableReadProtection ( void )
- {
- FLASH_OBProgramInitTypeDef OBInit;
- __HAL_FLASH_PREFETCH_BUFFER_DISABLE();
- HAL_FLASHEx_OBGetConfig ( &OBInit );
- if ( OBInit.RDPLevel == OB_RDP_LEVEL_1 )
- {
- OBInit.OptionType = OPTIONBYTE_RDP;
- OBInit.RDPLevel = OB_RDP_LEVEL_0;
- HAL_FLASH_Unlock();
- HAL_FLASH_OB_Unlock();
- HAL_FLASHEx_OBProgram ( &OBInit );
- HAL_FLASH_OB_Launch();
- HAL_FLASH_OB_Lock();
- HAL_FLASH_Lock();
- }
- __HAL_FLASH_PREFETCH_BUFFER_ENABLE();
- }
复制代码
一周热门 更多>