Skip to content

Commit

Permalink
cpu/stm32f1: add flashpage_raw support
Browse files Browse the repository at this point in the history
  • Loading branch information
aabadie committed Mar 13, 2018
1 parent 4f7dc1a commit 06392bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions cpu/stm32f1/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
FEATURES_PROVIDED += periph_flashpage
FEATURES_PROVIDED += periph_flashpage_raw

-include $(RIOTCPU)/stm32_common/Makefile.features
7 changes: 7 additions & 0 deletions cpu/stm32f1/include/cpu_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 06392bb

Please sign in to comment.