Skip to content

Commit 2dc9c2b

Browse files
DerekSnellnashif
authored andcommitted
samples: subsys: nvs: add testcase for MCXN947 internal flash
For boards frdm_mcxn947 and mcx_n9xx_evk test NVS in internal flash in addition to external QSPI flash. Also enable the NVS subsystem on these boards for Twister. Signed-off-by: Derek Snell <[email protected]>
1 parent bb7f776 commit 2dc9c2b

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
lines changed

boards/nxp/frdm_mcxn947/frdm_mcxn947_mcxn947_cpu0.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ supported:
2424
- i2c
2525
- i2s
2626
- i3c
27+
- nvs
2728
- pwm
2829
- regulator
2930
- rtc

boards/nxp/mcx_n9xx_evk/mcx_n9xx_evk_mcxn947_cpu0.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ supported:
2424
- i2c
2525
- i2s
2626
- i3c
27+
- nvs
2728
- pwm
2829
- regulator
2930
- rtc
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/* The MCXN947 boards place the storage_partition in external flash. For this
8+
* testcase, move the storage_partition to internal flash
9+
*/
10+
11+
/delete-node/ &storage_partition;
12+
13+
&flash {
14+
partitions {
15+
storage_partition: partition@100000 {
16+
label = "storage";
17+
reg = <0x100000 DT_SIZE_M(1)>;
18+
};
19+
};
20+
};

samples/subsys/nvs/sample.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,27 @@ tests:
2121
39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 \
2222
56 57 58 59 5a 5b 5c 5d 5e 5f 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 \
2323
73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f"
24+
sample.nvs.internal_flash:
25+
tags: nvs
26+
depends_on: nvs
27+
integration_platforms:
28+
- frdm_mcxn947/mcxn947/cpu0
29+
platform_allow:
30+
- frdm_mcxn947/mcxn947/cpu0
31+
- mcx_n9xx_evk/mcxn947/cpu0
32+
extra_args:
33+
- platform:frdm_mcxn947/mcxn947/cpu0:"DTC_OVERLAY_FILE=nxp/mcxn947_internal_flash.overlay"
34+
- platform:mcx_n9xx_evk/mcxn947/cpu0:"DTC_OVERLAY_FILE=nxp/mcxn947_internal_flash.overlay"
35+
harness: console
36+
harness_config:
37+
type: multi_line
38+
regex:
39+
- "Id: 1, Address: 192.168.1.1"
40+
- "Id: 2, Key: ff fe fd fc fb fa f9 f8"
41+
- "Id: 3, Reboot_counter: (.*)"
42+
- "Id: 4, Data: DATA"
43+
- "Id: 5, Longarray: 0 1 2 3 4 5 6 7 8 9 a b c d e f 10 11 12 13 14 15 16 17 18 19 1a 1b \
44+
1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 38 \
45+
39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 \
46+
56 57 58 59 5a 5b 5c 5d 5e 5f 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 \
47+
73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f"

0 commit comments

Comments
 (0)