Skip to content

Commit 24281e8

Browse files
committed
tests: drivers: Add QSPI driver test with single line mode
This test is introduced due to customer bug report: Failure on QSPI flash used in non-Quad mode (single line) Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
1 parent 4c623e6 commit 24281e8

File tree

6 files changed

+86
-0
lines changed

6 files changed

+86
-0
lines changed

CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,7 @@
847847
/tests/drivers/uart/ @nrfconnect/ncs-low-level-test
848848
/tests/drivers/sensor/multicore_temp/ @nrfconnect/ncs-low-level-test
849849
/tests/drivers/sdp_asm/ @nrfconnect/ncs-low-level-test @nrfconnect/ncs-ll-ursus
850+
/tests/drivers/nrf_qspi_flash/ @nrfconnect/ncs-low-level-test
850851
/tests/lib/at_cmd_parser/ @nrfconnect/ncs-modem
851852
/tests/lib/at_cmd_custom/ @nrfconnect/ncs-modem
852853
/tests/lib/at_parser/ @nrfconnect/ncs-modem

scripts/ci/tags.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -1206,6 +1206,7 @@ ci_tests_drivers_flash:
12061206
- nrf/tests/drivers/flash/
12071207
- nrfxlib/nrf_rpc/
12081208
- zephyr/drivers/flash/
1209+
- nrf/tests/drivers/nrf_qspi_flash/
12091210

12101211
ci_tests_unity:
12111212
files:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
cmake_minimum_required(VERSION 3.20.0)
8+
9+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
10+
11+
if(NOT SYSBUILD)
12+
message(FATAL_ERROR
13+
" This is a multi-image application that should be built using sysbuild.\n"
14+
" Add --sysbuild argument to west build command to prepare all the images.")
15+
endif()
16+
17+
project(nrf_qspi_flash)
18+
19+
target_sources(app PRIVATE ${ZEPHYR_BASE}/samples/drivers/spi_flash/src/main.c)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
&mx25r64 {
8+
status="okay";
9+
readoc="fastread";
10+
writeoc="pp";
11+
};

tests/drivers/nrf_qspi_flash/prj.conf

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CONFIG_FLASH=y
2+
CONFIG_ASSERT=y
3+
4+
CONFIG_PRINTK=y
5+
CONFIG_LOG=y
6+
CONFIG_CONSOLE=y
7+
CONFIG_UART_CONSOLE=y
8+
CONFIG_SERIAL=y
+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
common:
2+
sysbuild: true
3+
depends_on: spi
4+
5+
tests:
6+
tests.drivers.nrf_qspi_flash.qspi_multi_line_mode:
7+
tags:
8+
- ci_tests_drivers_flash
9+
- drivers
10+
- flash
11+
- spi
12+
platform_allow:
13+
- nrf52840dk/nrf52840
14+
- nrf5340dk/nrf5340/cpuapp
15+
integration_platforms:
16+
- nrf52840dk/nrf52840
17+
- nrf5340dk/nrf5340/cpuapp
18+
harness: console
19+
harness_config:
20+
type: multi_line
21+
ordered: true
22+
regex:
23+
- ".*Flash erase succeeded.*"
24+
- ".*Data read matches data written. Good.*"
25+
26+
tests.drivers.nrf_qspi_flash.qspi_single_line_mode:
27+
tags:
28+
- ci_tests_drivers_flash
29+
- drivers
30+
- flash
31+
- spi
32+
platform_allow:
33+
- nrf52840dk/nrf52840
34+
- nrf5340dk/nrf5340/cpuapp
35+
integration_platforms:
36+
- nrf52840dk/nrf52840
37+
- nrf5340dk/nrf5340/cpuapp
38+
extra_args:
39+
- EXTRA_DTC_OVERLAY_FILE="flash_cfg/mx25r64_single_line.overlay"
40+
harness: console
41+
harness_config:
42+
type: multi_line
43+
ordered: true
44+
regex:
45+
- ".*Flash erase succeeded.*"
46+
- ".*Data read matches data written. Good.*"

0 commit comments

Comments
 (0)