当前位置:网站首页>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数据库常用命令
- Redis source code and design analysis -- 18. Analysis of redis network connection Library
- Landmark buildings around the world
- New and malloc
- mysql case when
- Several implementations of PHP to solve concurrency problems
- 简述冒泡排序与快速排序
- Li Kai: the interesting and cutting-edge audio and video industry has always attracted me
- How to read a Book
- Cloud VR: the next step of virtual reality specialization
猜你喜欢

The new version of 3dcat v2.1.3 has been released. You can't miss these three function updates!

BiSeNet v1

STM8S003F3 内部flash调试

Construction of Huffman tree

云流化和云桌面有什么关系

imx6 RTL8189FTV移植

Lwip之内存与包缓冲管理

Sorting also needs to know the information and linked list

Memory and packet buffer management of LwIP

SLA 、SLO & SLI
随机推荐
STM8S003F3 内部flash调试
SLA 、SLO & SLI
mysql case when
Memory and packet buffer management of LwIP
[MySQL]数据库中的索引为什么是用B+树来实现? 哈希表/红黑树/B树是否可行呢?
imx6 RTL8189FTV移植
更新|3DCAT实时云渲染 v2.1.2版本全新发布
Nineteen year old summary
"Deprecated gradle features were used in this build, making it incompatible with gradle 6.0" problem solving
Redis source code and design analysis -- 17. Redis event processing
Cloud VR: the next step of virtual reality specialization
Oracle导入出错:IMP-00038: 无法转换为环境字符集句柄
直击考点:PMP考试中常见敏捷知识点汇总
STM32F105RBT6 内部flash调试
Hit the test site directly: summary of common agile knowledge points in PMP examination
Mock服务moco系列(三)- 重定向、正则表达式、延迟、模板、事件、分模块设计
SQL optimizer parsing | youth training camp notes
Good news! Ruiyun technology was awarded the member unit of 5g integrated application special committee of "sailing on the sea"
BiSeNet v1
Mock service Moco series (I) - introduction, first demo, get request, post request