settings storage in external flash

Hi,

Is it possible to use the Zephyr settings storage subsystem to store data in external flash?

We are dealing with some internal flash space issues and are trying to see if we can offload the "settings_storage" partition we currently have in internal flash to be stored in the external flash (using the MX25R32 flash device)

I tried updating our pm_static.yml file to define the parition like so:

settings_storage: { address: 0xf8000, device: MX25R32, region: external_flash }
But that throws errors when trying to save something to the settings subsystem.
Am I missing something? Is there something else I should be doing in order to be able to do this?
Is this even possible?
Any help would be appreciated, Thanks
Parents
  • Hi

    Due to the summer vacation period we are currently understaffed, so delayed replies must be expected. I am sorry about any inconvenience this might cause.

    To set up an external flash memory, you should do as we have in our .dts board files for the MX25R6435F that is by default mounted on most of our DKs. The size would have to be halved to match 32MBm and you should double check the JEDEC ID, etc. to see that it is set up correctly, but something like this in your overlay file should be the correct setup of an external flash memory:

    &qspi {
    	status = "okay";
    	pinctrl-0 = <&qspi_default>;
    	pinctrl-1 = <&qspi_sleep>;
    	pinctrl-names = "default", "sleep";
    	mx25r64: mx25r6435f@0 {
    		compatible = "nordic,qspi-nor";
    		reg = <0>;
    		/* MX25R64 supports only pp and pp4io */
    		writeoc = "pp4io";
    		/* MX25R64 supports all readoc options */
    		readoc = "read4io";
    		sck-frequency = <8000000>;
    		jedec-id = [c2 28 17];
    		sfdp-bfp = [
    			e5 20 f1 ff  ff ff ff 03  44 eb 08 6b  08 3b 04 bb
    			ee ff ff ff  ff ff 00 ff  ff ff 00 ff  0c 20 0f 52
    			10 d8 00 ff  23 72 f5 00  82 ed 04 cc  44 83 68 44
    			30 b0 30 b0  f7 c4 d5 5c  00 be 29 ff  f0 d0 ff ff
    		];
    		size = <67108864>;
    		has-dpd;
    		t-enter-dpd = <10000>;
    		t-exit-dpd = <35000>;
    	};
    };

    Best regards,

    Simon

Reply
  • Hi

    Due to the summer vacation period we are currently understaffed, so delayed replies must be expected. I am sorry about any inconvenience this might cause.

    To set up an external flash memory, you should do as we have in our .dts board files for the MX25R6435F that is by default mounted on most of our DKs. The size would have to be halved to match 32MBm and you should double check the JEDEC ID, etc. to see that it is set up correctly, but something like this in your overlay file should be the correct setup of an external flash memory:

    &qspi {
    	status = "okay";
    	pinctrl-0 = <&qspi_default>;
    	pinctrl-1 = <&qspi_sleep>;
    	pinctrl-names = "default", "sleep";
    	mx25r64: mx25r6435f@0 {
    		compatible = "nordic,qspi-nor";
    		reg = <0>;
    		/* MX25R64 supports only pp and pp4io */
    		writeoc = "pp4io";
    		/* MX25R64 supports all readoc options */
    		readoc = "read4io";
    		sck-frequency = <8000000>;
    		jedec-id = [c2 28 17];
    		sfdp-bfp = [
    			e5 20 f1 ff  ff ff ff 03  44 eb 08 6b  08 3b 04 bb
    			ee ff ff ff  ff ff 00 ff  ff ff 00 ff  0c 20 0f 52
    			10 d8 00 ff  23 72 f5 00  82 ed 04 cc  44 83 68 44
    			30 b0 30 b0  f7 c4 d5 5c  00 be 29 ff  f0 d0 ff ff
    		];
    		size = <67108864>;
    		has-dpd;
    		t-enter-dpd = <10000>;
    		t-exit-dpd = <35000>;
    	};
    };

    Best regards,

    Simon

Children
No Data
Related