This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Flash filing system for nRF Connect SDK

Hi there,

Our team is developing an application based on the nRF5340-DK - we are developing on the DK while our hardware is in transit.  Our schematic largely follows the reference design for all necessary peripherals.  Notably, we've used the same QSPI NOR flash series as the MX25R6435F specified in the PCA10095 schematic (albeit larger).  Our intention is to use this external flash as a general filing system to store sensor data

I've scoured the nRF Connect SDK examples and there doesn't seem to be any reference as to how one uses the external flash as a general filing system. I'd very much appreciate it if someone could please provide some guidance as to the simplest way to achieve this.  Thanks!

BR,

Z

Parents Reply Children
  • Great - thanks Simon. Will give it a go first thing in the morning - it's 9pm here ATM.

    BR,

    Zyrus

  • Hi Simon,

    Have tested and confirm that it works (at this stage).  I'm using a custom board with the Macronix MX66L1G45G (1-Gbit flash); I made the necessary changes in the zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340_cpuapp_common.dts as below:

    &qspi {
    	status = "okay";
    	sck-pin = <17>;
    	io-pins = <13>, <14>, <15>, <16>;
    	csn-pins = <18>;
    	mx66l1g: mx66l1g45g@0 {
    		compatible = "nordic,qspi-nor";
    		reg = <0>;
    		/* MX66L1G supports only pp and pp4io */
    		writeoc = "pp4io";
    		/* MX66L1G supports all readoc options */
    		readoc = "read4io";
    		sck-frequency = <8000000>;
    		label = "MX66L1G";
    		jedec-id = [c2 20 1b];
    		sfdp-bfp = [
    			e5 20 fb ff  ff ff ff 3f  44 eb 08 6b  08 3b 04 bb
    			fe ff ff ff  ff ff 00 ff  ff ff 44 eb  0c 20 0f 52
    			10 d8 00 ff  d6 49 c5 00  82 df 04 e3  44 03 67 38
    			30 b0 30 b0  f7 bd d5 5c  4a 9e 29 ff  f0 50 f9 85
    		];
    		size = <1073741824>;
    	};
    };
    

    4k page size is fine, but had to also modify the number of pages to be able to access the full memory.

    Thanks for your help.

    BR,
    Zyrus

Related