File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed
tests/subsys/emds/emds_flash/src Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,18 @@ config EMDS_FLASH_TIME_BASE_OVERHEAD_US
7575 datasheet.
7676 For RRAM-based persistent memory driver, use ERASEPROTECT and disregard the SOC_FLASH_NRF_PARTIAL_ERASE_MS parameter.
7777
78+ if SOC_FLASH_NRF_RRAM
79+
80+ config EMDS_RRAM_WRITE_BUFFER_SIZE
81+ int "Internal write-buffer size"
82+ default 1
83+ range 1 32
84+ help
85+ Number of 128-bit words.
86+ Maximum buffer size can be configured to the value of 32 (128-bit words).
87+
88+ endif # SOC_FLASH_NRF_RRAM
89+
7890module = EMDS
7991module-str = emergency data storage
8092source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"
Original file line number Diff line number Diff line change 2020#define RRAM_START DT_REG_ADDR(RRAM)
2121#define RRAM_SIZE DT_REG_SIZE(RRAM)
2222#define EMDS_FLASH_BLOCK_SIZE DT_PROP(RRAM, write_block_size)
23- #define WRITE_BUFFER_SIZE NRF_RRAMC_CONFIG_WRITE_BUFF_SIZE_MAX
23+ #define WRITE_BUFFER_SIZE CONFIG_EMDS_RRAM_WRITE_BUFFER_SIZE /* in 128-bits words */
24+ #define WRITE_LINE_SIZE 16 /* In bytes, one line is 128 bits. */
25+ #define WRITE_BUFFER_SIZE_IN_BYTES (WRITE_BUFFER_SIZE * WRITE_LINE_SIZE)
2426#else
2527#include <nrfx_nvmc.h>
2628#define FLASH DT_INST(0, soc_nv_flash)
@@ -145,7 +147,7 @@ static void commit_changes(size_t len)
145147 return ;
146148 }
147149
148- if ((len % WRITE_BUFFER_SIZE ) == 0 ) {
150+ if ((len % WRITE_BUFFER_SIZE_IN_BYTES ) == 0 ) {
149151 /* Our last operation was buffer size-aligned, so we're done. */
150152 return ;
151153 }
Original file line number Diff line number Diff line change 2222#define RRAM DT_INST(0, soc_nv_flash)
2323#define EMDS_FLASH_BLOCK_SIZE DT_PROP(RRAM, write_block_size)
2424#define EXPECTED_STORE_TIME_BLOCK_SIZE (400)
25- #define EXPECTED_STORE_TIME_1024 (3000 )
25+ #define EXPECTED_STORE_TIME_1024 (6200 )
2626#else
2727#define FLASH DT_INST(0, soc_nv_flash)
2828#define EMDS_FLASH_BLOCK_SIZE DT_PROP(FLASH, write_block_size)
You can’t perform that action at this time.
0 commit comments