diff --git a/cpu/stm32f1/Makefile.features b/cpu/stm32f1/Makefile.features index 6f8b9d6062d52362c69ada5fd858da790899a9d1..5e5e8b9118b419c443eed05bbce504daae169842 100644 --- a/cpu/stm32f1/Makefile.features +++ b/cpu/stm32f1/Makefile.features @@ -1,3 +1,4 @@ FEATURES_PROVIDED += periph_flashpage +FEATURES_PROVIDED += periph_flashpage_raw -include $(RIOTCPU)/stm32_common/Makefile.features diff --git a/cpu/stm32f1/include/cpu_conf.h b/cpu/stm32f1/include/cpu_conf.h index 3b73eb1b0ea00e440bb5317fee6677ed5bb7acee..7a1b6f2548f7d5b8e1ea38499c54b8d75cf03c56 100644 --- a/cpu/stm32f1/include/cpu_conf.h +++ b/cpu/stm32f1/include/cpu_conf.h @@ -65,6 +65,13 @@ extern "C" { #elif defined(CPU_MODEL_STM32F103RE) || defined(CPU_MODEL_STM32F103ZE) #define FLASHPAGE_NUMOF (256U) #endif + +/* The minimum block size which can be written is 2B. However, the erase + * block is always FLASHPAGE_SIZE. + */ +#define FLASHPAGE_RAW_BLOCKSIZE (2U) +/* Writing should be always 4 bytes aligned */ +#define FLASHPAGE_RAW_ALIGNMENT (4U) /** @} */ #ifdef __cplusplus