未验证 提交 940566c8 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #5296 from qingehao/rt-thread-qg-flash

[drv_flash_l4.c]修复stm32l4系列flash在下载完程序后首次擦除会失败的问题
......@@ -233,7 +233,7 @@ int stm32_flash_erase(rt_uint32_t addr, size_t size)
HAL_FLASH_Unlock();
/* Clear OPTVERR bit set on virgin samples */
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_OPTVERR);
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_OPTVERR | FLASH_FLAG_PGSERR);
/* Get the 1st page to erase */
FirstPage = GetPage(addr);
/* Get the number of pages to erase from 1st page */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册