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
Reply
  • 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
Children
  • 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,

    Which board do you use?

    Do you plan to use one external QSPI flash memory on your board which is different than existing one on the DK?

    Best regards,
    Dejan

  • Hi 

    I will not be using any bard. We will be using nRF52840 interfaced with external flash ove QSPI, in our complete product. 

    I mean no DK will be used here.

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

Related