打印
[STM32F0]

求 STM32F0内部flash读写例程 !

[复制链接]
4323|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 | 只看该作者
5
updownq| | 2017-2-13 16:52 | 只看该作者
评估板上都有相关的例程可以参考的。

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

298

主题

1418

帖子

5

粉丝