目录
1. 准备工作
2. 移植代码
1. 准备工作
1. 首先从在ST官网找到stm32G030c8 网页,点开documentaions标签 搜索“eeprom”
STM32G030C8 - Mainstream Value-Line Arm Cortex-M0+ MCU with 64 Kbytes of of Flash memory memory, 8 Kbytes RAM, 64 MHz CPU, 2x USART, timers, ADC, comm. I/F, 2-3.6V - STMicroelectronics STM32G030C8 - Mainstream Value-Line Arm Cortex-M0+ MCU with 64 Kbytes of of Flash memory memory, 8 Kbytes RAM, 64 MHz CPU, 2x USART, timers, ADC, comm. I/F, 2-3.6V, STM32G030C8T6, STMicroelectronics
https://www.st.com/en/microcontrollers-microprocessors/stm32g030c8.html2. 找到一个关于eeprom的文章AN4894,下载下来查看(下载可能需要登录st的账号)

3. 打开AN4894后,在文章里面找到关于API相关的描述,有一个相关软件包“X-CUBE-EEPROM”

于是在ST官网搜索这个“X-CUBE-EEPROM”,果然搜索到可以下载。
X-CUBE-EEPROM - EEPROM emulation expansion software for STM32Cube - STMicroelectronics
https://www.st.com/en/embedded-software/x-cube-eeprom.html
4. 下载完软件扩展包,解压展开后,开始研究。 我此次使用的单片机为STM32G030C8T6,根据AN4894文档描述,应该参考工程里面的STM32G0 相关例程。
2. 移植代码
1. 此次我使用的是STM32 Cube IDE,根据例程,在图形化界面首先打开了Flash的相关中断

然后又在Code generation标签,选择了形成初始化代码。我一开始这里没选,发现开了中断,在自动生成的代码里面找不到配置中断的函数。


版权声明:本文为CSDN博主「nuomigege」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/idoming/article/details/121395150
暂无评论