当前位置:网站首页>Stm8s003f3 internal flash debugging
Stm8s003f3 internal flash debugging
2022-07-25 18:06:00 【smile_ 5me】
Here's a record , Convenient for later use
View the documentation manual ,data eeprom The starting address of is 0x004000, This is used to store some, such as version number ,ID, Or use this flag bit

Sample code :
typedef enum {
FLASH_MEMTYPE_PROG = (u8)0x00, /*!< Program memory */
FLASH_MEMTYPE_DATA = (u8)0x01 /*!< Data EEPROM memory */
} FLASH_MemType_TypeDef;
int main()
{
u32 addr = 0x4000;
CLK_HSIPrescalerConfig(CLK_PRESCALER_HSIDIV1);
while(1)
{
FLASH_Unlock(FLASH_MEMTYPE_DATA); // according to MemType Fill in
FLASH_EraseByte(addr);
FLASH_ProgramByte(addr, 0xa5);
if(FLASH_ReadByte(addr) == 0xa5)
{
;
}
FLASH_Lock(FLASH_MEMTYPE_DATA);
delay_ms(500);
}
}
Reference blog :https://blog.csdn.net/zhangxuechao_/article/details/77749823
边栏推荐
- MySQL page lock
- Three control methods of TestNG execution sequence
- ORB_SLAM3复现——上篇
- Sequential storage structure, chain storage structure and implementation of stack
- mongodb 集群及分片
- 专访即构科技李凯:音视频的有趣、行业前沿一直吸引着我
- What is the relationship between cloud fluidization and cloud desktop
- mysql case when
- Installation and operation instructions of SVN client (TortoiseSVN)
- 推荐一个沁恒的蓝牙的参考博客
猜你喜欢

Redistemplate solves the problem of oversold inventory in the seckill system with high speed - redis transaction + optimistic lock mechanism

What are the advantages of real-time cloud rendering

RedisTemplate解决高并发下秒杀系统库存超卖方案 — Redis事务+乐观锁机制

Could not stop Cortex-M device! please check the JTAG cable的解决办法

十九岁的总结

SVN客户端(TortoiseSVN)安装及使用说明

STM8S003F3 内部flash调试

Memory and packet buffer management of LwIP

使用sqldeveloper连接mysql

Introduction to cloud XR and development opportunities of cloud XR in 5g Era
随机推荐
How many points did NPDP pass? How to pass with high scores?
Update 3dcat real time cloud rendering V2.1.2 release
Basic knowledge of software testing (mind mapping)
有没有什么不起眼却挣钱的副业?
NPDP多少分通过?如何高分通过?
Landmark buildings around the world
绘制pdf表格 (一) 通过itext实现在pdf中绘制excel表格样式并且实现下载(支持中文字体)
Cloud VR: the next step of virtual reality specialization
Creation of unity Bezier curve
Several implementations of PHP to solve concurrency problems
srec_cat 常用参数的使用
go defer与recover简单笔记
Linux启动mysql报错
大话DevOps监控,团队如何选择监控工具?
「行话」| 用DevOps高效交付游戏,是种什么体验?
Talking about Devops monitoring, how does the team choose monitoring tools?
3DCAT v2.1.3新版本发布,这三大功能更新你不容错过!
Redis source code and design analysis -- 15. RDB persistence mechanism
Auditing相关注解
C语言 整数与字符串的相互转换