Reading and writing sensor data to external flash on nrf5340-dk

Hello,

I want to use external flash. I did some research on the subject. I am using SDK 2.6.1. I have a few questions.

1- Does the spi_flash example I examined work on external flash?

2- 2 core updates are actively used in the system. I need as much space as possible for data. I know there is 64MB space for external flash. But I don't know how the partition should be divided?

3-Is it the internal flash that appears as Flash0? I could not find a partition structure for the external flash in this example.

Is there an example where I can write data to external flash using Qspi?

Could you support me on the subject

Parents
  • Hello,

    1- Does the spi_flash example I examined work on external flash?

    Yes, that is my understanding. Though note that it is not a sample made directly by nordic, so it might not work immediately with our devices right out of the box.

    2- 2 core updates are actively used in the system. I need as much space as possible for data. I know there is 64MB space for external flash. But I don't know how the partition should be divided?

    Are you saying that you are planning on doing a DFU in order to upgrade both cores of the 5340, and save the new image in external flash?

    Regards,

    Elfving

  • Hello,

    Yes, I am currently saving the new image on the flash. When I activate the two core updates in projconf, it saves the new image on the external flash. How can I partition the external flash? If flash 0 means external flash, will it be enough to revise flash0?

  • Additionally, 128MB flash was installed. In the spi_flash example, I enter 134217728 as the qspi size, but the value shown in devicetree is 16MiB. Why? 

    &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 = "pp";
            /* MX25R64 supports all readoc options */
            readoc = "read4io";
            sck-frequency = <8000000>;
            jedec-id = [ef 40 18];
            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 = <134217728>;
            has-dpd;
            t-enter-dpd = <10000>;
            t-exit-dpd = <35000>;
        };
    };

Reply
  • Additionally, 128MB flash was installed. In the spi_flash example, I enter 134217728 as the qspi size, but the value shown in devicetree is 16MiB. Why? 

    &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 = "pp";
            /* MX25R64 supports all readoc options */
            readoc = "read4io";
            sck-frequency = <8000000>;
            jedec-id = [ef 40 18];
            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 = <134217728>;
            has-dpd;
            t-enter-dpd = <10000>;
            t-exit-dpd = <35000>;
        };
    };

Children
No Data
Related