Skip to content

Commit 3bf639d

Browse files
alxelaxrlubos
authored andcommitted
emds: add preliminary timings for rram
Commit adds preliminary writing timings for flash driver based on rram. Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
1 parent 0797c1b commit 3bf639d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

subsys/emds/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@ config EMDS_THREAD_PRIORITY
3737

3838
config EMDS_FLASH_TIME_WRITE_ONE_WORD_US
3939
int "Time to write one word into flash"
40+
default 210 if SOC_FLASH_NRF_RRAM
4041
default 41
4142
help
4243
Max time to write one word (4 bytes) in flash (in microseconds). This
4344
value is dependent on the chip used, and should be checked against the
4445
chip datasheet.
46+
For RRAM-based flash drivers, data is written in blocks of 32 bytes over
47+
buffered writing. This value is used to calculate the time to write
48+
one 32-byte block.
4549

4650
config EMDS_FLASH_TIME_ENTRY_OVERHEAD_US
4751
int "Time to schedule write of one entry"
@@ -51,6 +55,7 @@ config EMDS_FLASH_TIME_ENTRY_OVERHEAD_US
5155

5256
config EMDS_FLASH_TIME_BASE_OVERHEAD_US
5357
int "Time to schedule the store process"
58+
default 18200 if SETTINGS && SOC_FLASH_NRF_RRAM
5459
default 85000 if SETTINGS && !SOC_FLASH_NRF_PARTIAL_ERASE
5560
default 9000 if SETTINGS && SOC_FLASH_NRF_PARTIAL_ERASE
5661
default 500
@@ -63,6 +68,8 @@ config EMDS_FLASH_TIME_BASE_OVERHEAD_US
6368
worst case scenario, before starting storing entries. This value
6469
is dependent on the chip used, and should be checked against the chip
6570
datasheet.
71+
For RRAM-based flash drivers, the time is defined by the erasing block size.
72+
The default erasing block size is 4096 bytes.
6673

6774
module = EMDS
6875
module-str = emergency data storage

tests/subsys/emds/emds_api/src/main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,8 @@ static void store(void)
219219

220220
printf("Store time: Actual %lldus, Worst case: %dus\n",
221221
store_time_us, estimate_store_time_us);
222-
#if !defined CONFIG_SOC_FLASH_NRF_RRAM /* TODO: Fix it with NCSDK-26922 */
222+
223223
zassert_true((store_time_us < estimate_store_time_us), "Store takes to long time");
224-
#endif
225224
}
226225

227226
static void clear(void)

0 commit comments

Comments
 (0)