Skip to content

Commit d422d56

Browse files
nvlsianpucarlescufi
authored andcommitted
samples/drivers/soc_flash_nrf: enable nrf9160_pca10090 targets
The patch provides flash offsets appropriate for running this sample on nrf9160_pac10090 targets. As that sample is small one, it is done with assumption that image_1 flash partition is empty. Signed-off-by: Andrzej Puzdrowski <[email protected]>
1 parent 2d24ce8 commit d422d56

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

samples/drivers/soc_flash_nrf/sample.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ sample:
22
name: SoC Flash on NRF52
33
tests:
44
sample.driver.soc_flash_nrf:
5-
platform_whitelist: nrf52_pca10040
5+
platform_whitelist: nrf52_pca10040 nrf9160_pca10090 nrf9160_pca10090ns
66
tags: flash nrf52

samples/drivers/soc_flash_nrf/src/main.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@
1010
#include <device.h>
1111
#include <stdio.h>
1212

13-
/* Offset between pages */
14-
#define FLASH_TEST_OFFSET 0x40000
13+
14+
#ifdef CONFIG_TRUSTED_EXECUTION_NONSECURE
15+
#define FLASH_TEST_OFFSET DT_FLASH_AREA_IMAGE_1_NONSECURE_OFFSET
16+
#else
17+
#define FLASH_TEST_OFFSET DT_FLASH_AREA_IMAGE_1_OFFSET
18+
#endif
19+
1520
#define FLASH_PAGE_SIZE 4096
1621
#define TEST_DATA_WORD_0 0x1122
1722
#define TEST_DATA_WORD_1 0xaabb

0 commit comments

Comments
 (0)