Using external flash other than MX25R64

Hi,

We are using nRF52840 for BLE functionality.

We are planing to use external flash with 128Mb which is other than MX25R64 available on DK board.

As part of initial bring up of external flash we are able to test external flash by defining PM_static.yml by having MCUBOOT secondary partition, Little FS in the external flash.

Now our main concern is we will not be able to use this flash but using other flashand the interface is QSPI.

My main concern is when we are moving to other flash what and all the changes from scratch is needed so that the external flash works as expected.

For e.g: DTS file modification for the flash, and what and all things needed as part of the driver modification.

I am new to the flash terminology and also can you help, where the driver code for flash exists and what modifications required for the flash othean default one, how to include it in the build.

Basically the steps involved in bringing up the external flash other than MX25R64

Parents Reply Children
  • Hi,

    If you are planning to use QSPI NOR device which follows JEDEC specification, the basic set of features should be supported directly through nrf_qspi_nor.c driver. NAND flash would most likely be incompatible due to different sector sizes or use of different flash commands.

    Best regards,
    Dejan

  • we will be using NOR flash only.

    So you mean with the general configs which we use for the flash, same will work right?

    I am new to this flash terminology. what is JEDEC spec? w.r.t this spec how the dts changes should be modified. I mean below is for default flash exists in nRF52840 DK. how these detials need to modified.

    &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>;
    	};
    };

  • Hi,

    JEDEC provides open standards for microelectronics industry.

    General information about Devicetree bindings is available in the documentation. The meaning of specific properties related to QSPI is shown in devicetree bindings for Nordic QSPI peripheral. You should be able to find appropriate values of the properties for your particular NOR flash memory from the device manufacturer's datasheet.

    Best regards,
    Dejan

  • Thank you for the input. these links helped upto certain point.

    Datasheet of mx25r6435f: Flash of DK

    https://www.digikey.in/en/datasheets/macronix/macronixmx25r6435f20wide20range2064mb20v14#pf19

    Our flash is MT25QL128ABA1EW9-0SIT: Serial 128MB NOR flash

    https://media-www.micron.com/-/media/client/global/documents/products/data-sheet/nor-flash/serial-nor/mt25q/die-rev-a/mt25q_qlhs_l_128_aba_0.pdf

    Compared the values of DTS with bothe data sheets able to understand only few parameters.

    But still did not get the values of 

    writeoc, readoc values from datasheet of DK_flash to corelate to my flash.

    Also:

    sfdp-bfp,
    t-enter-dpd,
    t-exit-dpd.
    values also how it is given in DTS. did not get any clue from MX data sheet.
    Clock frequency in our data sheet is 90Mhz and 133 Mhz. not sure which one to use.
    Because in MX flash data sheet also it is 80MHZ but in the nordic DTS only 8MHZ is used.
    only JDEC ID and has dpd is only clear from the data sheets.
  • Hi,

    You could read more about QSPI NOR properties in the documentation. In QSPI electrical specification, you can see that maximum supported frequency for QSPI is 32 MHz. Table 10 in datasheet shows that some frequencies can be less that maximum 32 MHz. It might be possible to configure one of the mentioned values which are less than 32 MHz. Table 44 in the same datasheet specifies DPD exit time (most probably this would be t-exit-dpd) to be 30 us. High to deep power-down which most probably corresponds to t-enter-dpd is specified to be 3 us. The memory size is doubled, so probably you would look at value 134217728. Write and read operation codes (writeoc and readoc) depend on the supported options for your particular flash memory. In any case, I would recommend that you contact flash memory manufacturer as they produce this flash memory and can provide the most reliable information related to the parameters in question. 

    Best regards,
    Dejan

Related