当前位置:网站首页>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
- Who is responsible for the problems of virtual idol endorsement products?
- Basic knowledge of software testing (mind mapping)
- SLA 、SLO & SLI
- 排序还需要了解的信息以及链表
- SVN客户端(TortoiseSVN)安装及使用说明
- 简述Synchronized以及锁升级
- Keil5 "loading PDSC debug description failed for STMicroelectronics stm32hxxxxxxx" solution
- Idea integrates common functions of SVN code management
- Sequential storage structure, chain storage structure and implementation of stack
猜你喜欢
SQL optimizer parsing | youth training camp notes

Redis source code and design analysis -- 15. RDB persistence mechanism

"Digital security" alert NFT's seven Scams

Oracle使用impdp导入报错:ORA-39001: 参数值无效 ORA-39000: 转储文件说明错误 ORA-39088: 文件名不能包含路径说明

Creation of unity Bezier curve

Cloud XR面临的问题以及Cloud XR主要应用场景

Talking about Devops monitoring, how does the team choose monitoring tools?

LeetCode 101. 对称二叉树 && 100. 相同的树 && 572. 另一棵树的子树

喜讯!瑞云科技被授予“海上扬帆”5G融合应用专委会成员单位

Keil5 "loading PDSC debug description failed for STMicroelectronics stm32hxxxxxxx" solution
随机推荐
STM8S003F3 内部flash调试
testng执行顺序的3中控制方法
大话DevOps监控,团队如何选择监控工具?
虚拟偶像代言产品出问题谁负责?
Who is responsible for the problems of virtual idol endorsement products?
C语言 cJSON库的使用
go defer与recover简单笔记
Is there any inconspicuous but profitable sideline?
OSPF --- open shortest priority path protocol
OSPF comprehensive experiment
Redis source code and design analysis -- 15. RDB persistence mechanism
Which real-time gold trading platform is reliable and safe?
Keil5 "loading PDSC debug description failed for STMicroelectronics stm32hxxxxxxx" solution
LeetCode 101. 对称二叉树 && 100. 相同的树 && 572. 另一棵树的子树
Linux启动mysql报错
推荐一个沁恒的蓝牙的参考博客
Auditing related notes
SLA 、SLO & SLI
Three control methods of TestNG execution sequence
使用sqldeveloper连接mysql