Skip to content

Commit 09972e6

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 09972e6

File tree

5 files changed

+83
-0
lines changed

5 files changed

+83
-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
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
+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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_build
9+
- flash
10+
- spi
11+
platform_allow:
12+
- nrf52840dk/nrf52840
13+
- nrf5340dk/nrf5340/cpuapp
14+
integration_platforms:
15+
- nrf52840dk/nrf52840
16+
- nrf5340dk/nrf5340/cpuapp
17+
harness: console
18+
harness_config:
19+
type: multi_line
20+
ordered: true
21+
regex:
22+
- ".*Flash erase succeeded.*"
23+
- ".*Data read matches data written. Good.*"
24+
25+
tests.drivers.nrf_qspi_flash.qspi_single_line_mode:
26+
tags:
27+
- ci_build
28+
- flash
29+
- spi
30+
platform_allow:
31+
- nrf52840dk/nrf52840
32+
- nrf5340dk/nrf5340/cpuapp
33+
integration_platforms:
34+
- nrf52840dk/nrf52840
35+
- nrf5340dk/nrf5340/cpuapp
36+
extra_args:
37+
- EXTRA_DTC_OVERLAY_FILE="flash_cfg/mx25r64_single_line.overlay"
38+
harness: console
39+
harness_config:
40+
type: multi_line
41+
ordered: true
42+
regex:
43+
- ".*Flash erase succeeded.*"
44+
- ".*Data read matches data written. Good.*"

0 commit comments

Comments
 (0)