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
  • when we modified the details in DTS as per our MT25QL128ABA1EW9-0SIT: Serial 128MB NOR flash, ther is no success. 

    When we boot the device it is still expecting the JEDEC ID of  mx25r6435f.

    What should be the name for the our flash in dts inplace of " mx25r64: mx25r6435f@0" and compatible id.

     

    &qspi {
    	status = "okay";
    	pinctrl-0 = <&qspi_default>;
    	pinctrl-1 = <&qspi_sleep>;
    	pinctrl-names = "default", "sleep";
    	MT25QL128: MT25QL128@0 {
    		compatible = "nordic,qspi-nor";
    		reg = <0>;
    		/* MX25R64 supports only pp and pp4io */
    		writeoc = "pp2o";
    		/* MX25R64 supports all readoc options */
    		readoc = "read2o";
    		sck-frequency = <8000000>;
    		jedec-id = [20 BA 18];
    		sfdp-bfp = [
    		53 46 44 50 06 01 01 FF 00 06 01 10 30 00 00 FF 84 00 01 02 80 00 00 FF
    		FF FF FF FF FF FF FF FF
    		FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    		E5 20 F9 FF FF FF FF 07 29 EB 27 6B 27 3B
    		27 BB FF FF FF FF FF FF 27 BB FF FF 29 EB 0C 20 10 D8 0F 52 00 00
    		00 99 4A 24 C9 03 8E 8B 38 27 01 AC 7A 75 
    		7A 75 5C D5 BD FB FF 82 0F 4A 00 00 3D 81
    		FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    		00 00 F0 FF FF FF FF FF
    		];
    		size = <134217728>;
    		has-dpd;
    		t-enter-dpd = <10000>;
    		t-exit-dpd = <35000>;
    	};
    };

    If put other name nothing happens but device is also not ready. 

    To test we are using the sample code "C:\ncs\v2.1.0\zephyr\samples\drivers\spi_flash"

    This fails as device not ready with our flash but works well with the DK flash

  • Hi,

    Jedec ID [00 00 00] might indicate that there is no proper connection between nRF52840 and external flash. You should try to verify the connection to the flash on your custom board.

    Best regards,
    Dejan

  • connection to flash is there but the part no. is not mx25r6435f. It is still expecting the JDEC ID of mx25r6435f. Our JDEC ID is different and it is jedec-id = [20 BA 18];.

    Our problem is why it still expecting of MX flash. Is any other changes required? like compatible etc.

  • Hi,

    You could try enabling 2 configuration options shown below.

    CONFIG_SPI_NOR_SFDP_RUNTIME 

    CONFIG_FLASH_JESD216_API

    Best regards,
    Dejan

Related