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
  • Not a complete answer, but I found this sample in the zephyr ics build that lets you find out all of the details of the flash chip you are using to enter in the dts. 

    zephyr/samples/drivers/jesd216

    had to add to prj.conf and change the printf to print (if you use RTT, serial comm might work as well, didn't have that hooked up)

    # QSPI configuration
    CONFIG_NORDIC_QSPI_NOR=y
    CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
    CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16

    # Enable logs
    CONFIG_LOG=y
    CONFIG_LOG_PRINTK=y
    CONFIG_LOG_MODE_DEFERRED=n
    CONFIG_LOG_BACKEND_RTT_MODE_DROP=n
    CONFIG_LOG_BACKEND_RTT_MESSAGE_SIZE=1024
    CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=1024
    CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=4096
    CONFIG_USE_SEGGER_RTT=y
    CONFIG_RTT_CONSOLE=y
  • This basic details I used while using default external flashof DK . My main concern is DTS file changes for QSPI and if any driver implementation needed.
    Can you ellobarate where i can see dts file relation with flash in the path \ncs\v2.1.0\zephyr\samples\drivers\jesd216.

    I do not see any dts related here

  • Hi

    We are trying to get the SFDP related details and still waiting for them.

    One more question here i have is , after updating the dts file with these details is there any other things do we need to modify.

    we are using zephyr os as part of NCS 2.1.0. do we need to integrate any driver for MT25QL128ABA1EW9-0SIT: Serial 128MB NOR flash. 

    If yes can you provide the link for the zephyr driver of this flash?

  • Hi,

    With proper configuration similar to what you showed earlier in &qspi, you would probably not need an additional driver.

    Regarding drivers, you could have a look at nrfx drivers and Zephyr flash drivers online.

    Best regards,
    Dejan

  • 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.

Reply Children
Related