From 01a1c5f94e12bb33af829009bcbf4e30ad113191 Mon Sep 17 00:00:00 2001 From: Dylan Laduranty Date: Thu, 6 Jul 2023 13:32:54 +0200 Subject: [PATCH] cpu/nrf53: add flashpage configuration Signed-off-by: Dylan Laduranty --- cpu/nrf53/include/cpu_conf.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cpu/nrf53/include/cpu_conf.h b/cpu/nrf53/include/cpu_conf.h index 5a8ec4975a..74858fde81 100644 --- a/cpu/nrf53/include/cpu_conf.h +++ b/cpu/nrf53/include/cpu_conf.h @@ -52,6 +52,21 @@ extern "C" { #endif /* def CPU_MODEL_NRF5340_APP */ /** @} */ +/** + * @brief Flash page configuration + * @{ + */ +#define FLASHPAGE_SIZE (4096U) /**< Size of a page in bytes */ +#define FLASHPAGE_NUMOF (256U) /**< Total number of flash pages */ + +/* The minimum block size which can be written is 4B. However, the erase + * block is always FLASHPAGE_SIZE. + */ +#define FLASHPAGE_WRITE_BLOCK_SIZE (4U) /**< Minimum block size */ +/* Writing should be always 4 bytes aligned */ +#define FLASHPAGE_WRITE_BLOCK_ALIGNMENT (4U) /**< Mandatory alignment */ +/** @} */ + #ifdef __cplusplus } #endif