NRF5340 How to use FAT FS with external flash

I am trying to use the external flash on my NRF5340dk to store and read data files. Raw IO from the spi_flash sample seems to be working fine, but I'm not sure how to mount the FAT file system. fs_sample says that FAT FS with external flash should work, but only nrf52840dk/nrf52840 and nrf52840dk_nrf52840_qspi are compatible. I have an old version of the project that uses NRF5 and FAT is working correctly there.

I tried to get fs_sample working with my board by copying the configs and overlays from the compatible boards and also trying just:

/ {
    chosen { 
         nordic,pm-ext-flash = &mx25r64;
    };
};

in the overlay, but all of these approaches led to this error:

*** Booting nRF Connect SDK v2.5.2 ***
[00:00:00.460,388] <err> main: Storage init ERROR!
[00:00:00.460,418] <err> fs: fs mount error (-5)
Error mounting disk.
[00:00:00.460,449] <err> fs: fs not mounted (mp == 0x20000000)

Parents Reply Children
No Data
Related