use NOR FLASH with QSPI in nRF5340

Hi,

My custom board uses Raytac MDBT53v, which has nRF5340 as its MCU.

My SW is based on the example audio code, and I want to use my external NOR FLAH IC, which is connected through QSPI.

The default devicetree configuration is suitable (in terms of pinout) and I'm trying to figure out how to enable this peripheral and which flash/qspi library would be favorable.

I tried running Zephyr's "spi_flash" example, that should be compatible with QSPI, but the use of DEVICE_DT_GET fails:

#define QSPI_NL DT_NODELABEL(qspi) //qspi is taken from nrf5340_cpuapp_peripherals.dtsi
PINCTRL_DT_DEFINE(QSPI_NL);
...
const struct device *flashQspiHandle = DEVICE_DT_GET(QSPI_NL); //fails when compiling

ERROR received:
c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: App/libapp.a(ext_flash.c.obj):C:/Projects/SixEye/FWs/HandUnit/App/ext_flash.c:25: undefined reference to `__device_dts_ord_100'

I'd appreciate guidance for simply configuring QSPI communication and executing flash operations.

Thanks,

Dekel

Related