[STM32F0] 求 STM32F0内部flash读写例程 !

[复制链接]
4689|4
 楼主| JobShare 发表于 2017-2-10 17:15 | 显示全部楼层 |阅读模式
求 STM32F0内部flash读写例程 !

谢谢!
xmshao 发表于 2017-2-10 17:29 | 显示全部楼层
读没啥好说的,关心擦写吧。
这个手册上都讲得详细了,先FLASH开锁,
The main Flash memory programming sequence in standard mode is as follows:
1.Check that no main Flash memory operation is ongoing by checking the BSY bit in the FLASH_SR register.
2. Set the PG bit in the FLASH_CR register.
3. Perform the data write (half-word) at the desired address.
4. Wait until the BSY bit is reset in the FLASH_SR register.
5. Check the EOP flag in the FLASH_SR register (it is set when the programming operation has succeeded), and then clear it by software.

另外,官方固件库flash目录下有例程参考。

评分

参与人数 1威望 +5 收起 理由
JobShare + 5 很给力!

查看全部评分

 楼主| JobShare 发表于 2017-2-13 14:36 | 显示全部楼层
xmshao 发表于 2017-2-10 17:29
读没啥好说的,关心擦写吧。
这个手册上都讲得详细了,先FLASH开锁,
The main Flash memory programming s ...

谢谢大侠 !

固件库 有例程,已找到!
updownq 发表于 2017-2-13 16:43 | 显示全部楼层
updownq 发表于 2017-2-13 16:52 | 显示全部楼层
评估板上都有相关的例程可以参考的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

298

主题

1417

帖子

5

粉丝
快速回复 在线客服 返回列表 返回顶部