Adding EEPROM emulation to existing project
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-06 8:52 AM
I'm a noob to the 32-bit world trying to add EEPROM emulation to my ToF application. I read AN3969 and downloaded the associated code, then added eeprom.c and eeprom.h to my project. That didn't compile due to typedef FLASH_Status missing amongst other things. Looking at some other posts, I learned that it is defined in stm32f4xx_flash.h which isn't included in the download but I was able to find on githib. Added it to the project and #included it in eeprom.c, now get even more errors, including in some of the hal .h files.
It seems that the code associated with AN3969 is only half the solution. Please could someone offer some guidance?
Solved! Go to Solution.
- Labels:
-
STM32Cube MCU Packages
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-07 2:38 AM
Hello @pretoriandave
>> That didn't compile due to typedef FLASH_Status missing amongst other things. Looking at some other posts, I learned that it is defined in stm32f4xx_flash.h which isn't included in the download, but I was able to find on GitHub.
The file should be included in the package downloaded from st.com. You need to download the full release package first and then apply the patch release.
For your application you can refer to the EEPROM emulation example available in the STM32F4 firmware.
Thanks
Omar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-06 8:58 AM - edited ‎2024-08-06 9:00 AM
IIRC, The code in AN3969 predates HAL - it uses the old "Standard Peripheral Library" (aka "SPL", or "StdPeriph").
I suggest:
- Get the AN3969 example application working in a project of its own.
- Port that example to HAL
- Take the ported code, and add it to your HAL project.
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-07 2:38 AM
Hello @pretoriandave
>> That didn't compile due to typedef FLASH_Status missing amongst other things. Looking at some other posts, I learned that it is defined in stm32f4xx_flash.h which isn't included in the download, but I was able to find on GitHub.
The file should be included in the package downloaded from st.com. You need to download the full release package first and then apply the patch release.
For your application you can refer to the EEPROM emulation example available in the STM32F4 firmware.
Thanks
Omar
