void OptionByteSet(u8 ob0, u8 ob1) { FLASH_ClearFlag(FLASH_FLAG_BSY | FLASH_FLAG_EOP | FLASH_FLAG_PGERR | FLASH_FLAG_WRPERR); FLASH_Unlock(); FLASH_OB_Unlock(); if(ob0 != 0xff) FLASH_OB_ProgramData(0x1FFFF804, ob0); if(ob1 != 0xff) FLASH_OB_ProgramData(0x1FFFF806, ob1); FLASH_OB_Launch(); FLASH_OB_Lock(); FLASH_Lock(); } 返回 FLASH_ERROR_PROGRAM 错误! 库: KEIL: STM32F0XX_DFP 1.4 |