Skip to content

Commit

Permalink
samples/drivers/soc_flash_nrf: enable nrf9160_pca10090 targets
Browse files Browse the repository at this point in the history
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 <andrzej.puzdrowski@nordicsemi.no>
  • Loading branch information
nvlsianpu authored and carlescufi committed Apr 19, 2019
1 parent 2d24ce8 commit d422d56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion samples/drivers/soc_flash_nrf/sample.yaml
Expand Up @@ -2,5 +2,5 @@ sample:
name: SoC Flash on NRF52
tests:
sample.driver.soc_flash_nrf:
platform_whitelist: nrf52_pca10040
platform_whitelist: nrf52_pca10040 nrf9160_pca10090 nrf9160_pca10090ns
tags: flash nrf52
9 changes: 7 additions & 2 deletions samples/drivers/soc_flash_nrf/src/main.c
Expand Up @@ -10,8 +10,13 @@
#include <device.h>
#include <stdio.h>

/* Offset between pages */
#define FLASH_TEST_OFFSET 0x40000

#ifdef CONFIG_TRUSTED_EXECUTION_NONSECURE
#define FLASH_TEST_OFFSET DT_FLASH_AREA_IMAGE_1_NONSECURE_OFFSET
#else
#define FLASH_TEST_OFFSET DT_FLASH_AREA_IMAGE_1_OFFSET
#endif

#define FLASH_PAGE_SIZE 4096
#define TEST_DATA_WORD_0 0x1122
#define TEST_DATA_WORD_1 0xaabb
Expand Down

0 comments on commit d422d56

Please sign in to comment.