Skip to main content
MHoss.1
Associate III
April 27, 2020
Solved

Setting up EEPROM emulator for STM32L

  • April 27, 2020
  • 2 replies
  • 1737 views

I'm trying to use EEPROM emulation API in a project. I have downloaded the expansion package. Based on AN4894 I need core and porting to be included in my project so I copied them under a new directory in Middleware and included the path. Then added the eeprom_emul.h to my project. However stm32l4xx_ll_crc.h is included in the eeprom_emul.h which is not in my project. I activated the crc in cubemx and regenerated the code but this file is missing. Would appreciate any help.

This topic has been closed for replies.
Best answer by MHoss.1

After not being satisfied with just copying a header file and digging deeper, I realized that CubeMX let's you choose LL or HAL for the chosen components. So after selecting CRC go to "Project Manager" tab, on the left choose "Advanced Settings" and on the top you can select LL or HAL for each of the components. EEPROM uses the LL CRC so just pick it from the drop down and all the related files will be added from the correct version of the firmware.

2 replies

Tesla DeLorean
Guru
April 27, 2020

So copy the file from the L4 repository into the local project's directory for include files.

STM32Cube_FW_L4_V1.14.0\Drivers\STM32L4xx_HAL_Driver\Inc\stm32l4xx_ll_crc.h

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
MHoss.1
MHoss.1Author
Associate III
April 27, 2020

I was hoping there would be a more consistent way that keeps track of the firmware versions too. But this worked fine. Thank you.

MHoss.1
MHoss.1AuthorBest answer
Associate III
May 1, 2020

After not being satisfied with just copying a header file and digging deeper, I realized that CubeMX let's you choose LL or HAL for the chosen components. So after selecting CRC go to "Project Manager" tab, on the left choose "Advanced Settings" and on the top you can select LL or HAL for each of the components. EEPROM uses the LL CRC so just pick it from the drop down and all the related files will be added from the correct version of the firmware.