Im having trouble setting up and using flash on nRF5340dk.
Is there any example on how to use LittleFS on external flash that is on the dev kit?
Im having trouble setting up and using flash on nRF5340dk.
Is there any example on how to use LittleFS on external flash that is on the dev kit?
Hi,
Here is the example https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/subsys/fs/littlefs.
Please duplicate this https://github.com/nrfconnect/sdk-zephyr/blob/main/samples/subsys/fs/littlefs/boards/nrf52840dk_nrf52840_qspi.conf config file and rename it to nrf5340dk_nrf5340_cpuapp.conf.
Duplicate https://github.com/nrfconnect/sdk-zephyr/blob/main/samples/subsys/fs/littlefs/boards/nrf52840dk_nrf52840_qspi.overlay overlay file, rename it to nrf5340dk_nrf5340_cpuapp.overlay and update with the following content:
/* * Copyright (c) 2019 Peter Bigot Consulting, LLC * * SPDX-License-Identifier: Apache-2.0 */ /delete-node/ &storage_partition; / { chosen { nordic,pm-ext-flash = &mx25r64; }; fstab { compatible = "zephyr,fstab"; lfs1: lfs1 { compatible = "zephyr,fstab,littlefs"; mount-point = "/lfs1"; partition = <&lfs1_part>; automount; read-size = <16>; prog-size = <16>; cache-size = <64>; lookahead-size = <32>; block-cycles = <512>; }; }; }; &mx25r64 { partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; lfs1_part: partition@0 { label = "storage"; reg = <0x00000000 0x00010000>; }; }; };
Then, you could get the output like this
Regards,
Amanda H.
Thank you, It's working. I can now see all 8mb of flash. But there is an issue.
When running the littlefs example I get
Area 0 at 0x0 on mx25r6435f@0 for 8388608 bytes - Which is correct
but when I transfer that code, exact code, to my app I get
Area 2 at 0xfa000 on flash-controller@39000 for 24576 bytes
Ive been going over whats different but cant find it, Maybe Im missing something?
I also tried moving my code to littlefs example and everything was going fine until I added
It switched to flash flash-controller@39000, after commenting it out it stayed with flash and I cant get it to go back to mx25??
Thank you, It's working. I can now see all 8mb of flash. But there is an issue.
When running the littlefs example I get
Area 0 at 0x0 on mx25r6435f@0 for 8388608 bytes - Which is correct
but when I transfer that code, exact code, to my app I get
Area 2 at 0xfa000 on flash-controller@39000 for 24576 bytes
Ive been going over whats different but cant find it, Maybe Im missing something?
I also tried moving my code to littlefs example and everything was going fine until I added
It switched to flash flash-controller@39000, after commenting it out it stayed with flash and I cant get it to go back to mx25??