I want to connect a W25Q01JVZEIM (128MB) NOR Flash ROM to SPI3 of the nRF52833 and implement USB MSC functionality. However, the build fails. It seems the overlay description is incorrect, but I cannot identify what's wrong.
Could you please advise how to fix this?
If there are any sample projects for similar systems, please provide the links.
Hardware Configuration:
Target: nRF52833DK
External Flash: W25Q01JVZEIM (128MB NOR Flash)
SPI Pins:
SCK: P0.16
MOSI: P0.19
MISO: P0.26
CS: P0.27
Current Device Tree Overlay:
&pinctrl {
spim3_default: spim3_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 16)>,
<NRF_PSEL(SPIM_MOSI, 0, 19)>,
<NRF_PSEL(SPIM_MISO, 0, 26)>;
};
};
spim3_sleep: spim3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 16)>,
<NRF_PSEL(SPIM_MOSI, 0, 19)>,
<NRF_PSEL(SPIM_MISO, 0, 26)>;
low-power-enable;
};
};
};
&spi3 {
compatible = "nordic,nrf-spim";
status = "okay";
pinctrl-0 = <&spim3_default>;
pinctrl-1 = <&spim3_sleep>;
pinctrl-names = "default", "sleep";
cs-gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
w25q01jv: w25q01jv@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <8000000>;
size = <134217728>; /* 128MB in bytes */
jedec-id = [ef 40 21];
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
storage_partition: partition@0 {
label = "storage";
reg = <0x00000000 0x08000000>; /* 128MB in hex */
};
};
};
};
Build Environment:
- nRF Connect SDK: v3.1.0
- Toolchain: b8b84efebd
- Build System: west + CMake
Build Error: The build process fails during Kconfig parsing phase when flash-related configuration options are included.
Expected Functionality:
- SPI NOR flash detection and initialization
- FATFS filesystem on external flash
- USB MSC (Mass Storage Class) to expose the filesystem via USB
Any guidance on the correct device tree configuration or references to working examples would be greatly appreciated.
Thank you for your assistance.