diff --git a/cpu/stm32l0/Makefile.features b/cpu/stm32l0/Makefile.features index d24cf4c8dbc67230ca895c9a22f28ff3cbd5c30e..79346e3fde7d24e7bad26dc3f25c3642a1ffe49a 100644 --- a/cpu/stm32l0/Makefile.features +++ b/cpu/stm32l0/Makefile.features @@ -1,6 +1,7 @@ FEATURES_PROVIDED += periph_flash_common FEATURES_PROVIDED += periph_flashpage FEATURES_PROVIDED += periph_flashpage_raw +FEATURES_PROVIDED += periph_eeprom FEATURES_PROVIDED += periph_hwrng BOARDS_WITHOUT_HWRNG += nucleo-l031k6 diff --git a/cpu/stm32l0/include/cpu_conf.h b/cpu/stm32l0/include/cpu_conf.h index d8cb2b5ed42303acd4869aad8cb40dc549ac4a7b..bae780aef6d9ef6ba880d7eab0c640b2c0728df9 100644 --- a/cpu/stm32l0/include/cpu_conf.h +++ b/cpu/stm32l0/include/cpu_conf.h @@ -79,6 +79,20 @@ extern "C" { #define FLASHPAGE_RAW_ALIGNMENT (4U) /** @} */ +/** + * @name EEPROM configuration + * @{ + */ +#define EEPROM_START_ADDR (0x08080000) +#if defined(CPU_MODEL_STM32L073RZ) || defined(CPU_MODEL_STM32L072CZ) +#define EEPROM_SIZE (6144U) /* 6kB */ +#elif defined(CPU_MODEL_STM32L053R8) +#define EEPROM_SIZE (2048U) /* 2kB */ +#elif defined(CPU_MODEL_STM32L031K6) +#define EEPROM_SIZE (1024U) /* 1kB */ +#endif +/** @} */ + #ifdef __cplusplus } #endif