[eeprom] [stm32l151] Driver for internal EEPROM

Hello everyone,

I have a task to read/write the internal EEPROM block on the STM32L151 MCU and as I can see there’s no driver or interface implemeted yet for this kind of task.

My question is how can I add the EEPROM features support into the RIOT OS?

Should I use NVRAM interface? Could I use the ST’s SPL code at the RIOT driver level?

Best regards.

Dear Anon,

I have a task to read/write the internal EEPROM block on the STM32L151 MCU and as I can see there's no driver or interface implemeted yet for this kind of task.

My question is how can I add the EEPROM features support into the RIOT OS?

Should I use NVRAM interface?

Yes, the NVRAM interface is the right choice for EEPROM.

Could I use the ST's SPL code at the RIOT driver level?

I think usage of the ST standard peripheral library has been discussed before, I have no time to search for the outcome right now. Please search the mailing list archives and the issue tracker/pull requests.

Maybe you could link to the results you find from the FAQ in the RIOT Wiki if you find it.

Cheers, Ludwig

​Dear Anon,​

​To expand on Ludwig’s reply:​

Does the eeprom support overwriting single bytes or​ ​ does it require an erase command​ ​ before memory can be overwritten?

If you can freely access random bytes and overwrite random bytes then NVRAM is the correct interface.

If you need erase I suggest you implement it against the MTD interface currently under review in ​ ​ https://github.com/RIOT-OS/RIOT/pull/5624

The current proposal is aimed at NOR and NAND flash memories, but it would be great if we can make whatever adaptations needed for it to fit EEPROM as well!

Best regards, Joakim