cpu/stm32l1: add flashpage support
This commit is contained in:
parent
4972f952d4
commit
4e1f2b5d38
@ -1 +1,4 @@
|
||||
FEATURES_PROVIDED += periph_flashpage
|
||||
FEATURES_PROVIDED += periph_flashpage_raw
|
||||
|
||||
-include $(RIOTCPU)/stm32_common/Makefile.features
|
||||
|
||||
@ -72,10 +72,30 @@ extern "C" {
|
||||
#define CPU_FLASH_BASE FLASH_BASE
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Flash page configuration
|
||||
* @{
|
||||
*/
|
||||
#if defined(CPU_MODEL_STM32L152RE) || defined(CPU_MODEL_STM32L151RC)
|
||||
#define FLASHPAGE_SIZE (256U)
|
||||
#if defined(CPU_MODEL_STM32L152RE)
|
||||
#define FLASHPAGE_NUMOF (2048U) /* 512KB */
|
||||
#endif
|
||||
#if defined(CPU_MODEL_STM32L151RC)
|
||||
#define FLASHPAGE_NUMOF (1024U) /* 256KB */
|
||||
#endif
|
||||
#endif
|
||||
/* The minimum block size which can be written is 4B. However, the erase
|
||||
* block is always FLASHPAGE_SIZE.
|
||||
*/
|
||||
#define FLASHPAGE_RAW_BLOCKSIZE (4U)
|
||||
/* Writing should be always 4 bytes aligned */
|
||||
#define FLASHPAGE_RAW_ALIGNMENT (4U)
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CPU_CONF_H */
|
||||
/** @} */
|
||||
/** @} */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user