External flash not working with simple example on nrf9160dk 1.0.0

Hi,

I have a very simple example which just enables the SPI flash on the nrf9160 and then tries to mount littlefs on it. Unfortunately, it doesn't seem to be working on my nrf9160dk 1.0.0 (it definitely has the flash chip on it, I can see it! the label on the bottom also says 1.0.0)

I am using NCS v2.1.2 and building with:

[email protected] west build --pristine

then just `west flash` to load it on. I have flashed the hex file from here to the nrf52: https://github.com/simon-iversen/sdk-nrf/tree/d1a11f2c39e3b8fb0af7652e7e720626f0e1298e/samples/nrf9160/http_update/application_update to connect ext_flash to the nrf91.

The output I see is:

*** Booting Zephyr OS build v3.1.99-ncs1-1 ***
[00:00:00.511,962] <inf> littlefs: LittleFS version 2.4, disk version 2.0
[00:00:00.511,962] <err> littlefs: can't open flash area 0
[00:00:00.511,993] <err> fs: fs mount error (-19)
[00:00:00.511,993] <err> main: littlefs mount failed

I have attached the code I am using. Could you please help me understand what I am doing wrong?

2703.nrf9160dk_extflash.zip

Thanks,

Jeremy

Related