nRF connect SDK ,Matter OTA

Hi,

We are debugging the OTA function of Matter and using nrf52840 IC, but our board is relatively small, so we cannot use the Flash IC of the example; We are using IS25LP080D;

We have modified the relevant configuration of QSPI and the program can run correctly, but we encountered a problem during OTA,

The UART printing information is as follows:

May I ask what error this may be? Thank you for your help

I: 448320 [EM]>>> [E:33130i S:45885 M:240345016 (Ack:209591795)] (S) Msg RX from 1:0000000000000001 [CFC8] --- Type 0001:09 (IM:InvokeCommandResponse)
I: 448333 [DMG]Received Command Response Data, Endpoint=0 Cluster=0x0000_0029 Command=0x0000_0001
D: 448342 [SWU]QueryImageResponse:
D: 448345 [SWU]  status: 0
D: 448348 [SWU]  imageURI: bdx://0000000000000001/../xlc-matter/build_1/zephyr/matter.ota
D: 448356 [SWU]  softwareVersion: 12
D: 448359 [SWU]  softwareVersionString: R1.2
D: 448363 [SWU]  updateToken: 32
D: 448366 [SWU]  userConsentNeeded: 0
D: 448369 [SWU]Update available from version 11 to 12
I: 448375 [EM]<<< [E:33130i S:45885 M:209591796 (Ack:240345016)] (S) Msg TX to 1:0000000000000001 [CFC8] --- Type 0000:10 (SecureChannel:StandaloneAck)
I: 448388 [IN](S) Sending msg 209591796 on secure session with LSID: 45885
D: 448397 [SWU]Establishing session to provider node ID 0x0000000000000001 on fabric index 1
I: 448406 [DIS]Found an existing secure session to [1:0000000000000001]!
D: 448412 [DIS]OperationalSessionSetup[1:0000000000000001]: State change 1 --> 5
D: 448419 [SWU]BDX::SendMessage
I: 448423 [EM]<<< [E:33131i S:45885 M:209591797] (S) Msg TX to 1:0000000000000001 [CFC8] --- Type 0002:04 (BDX:ReceiveInit)
I: 448434 [IN](S) Sending msg 209591797 on secure session with LSID: 45885
I: 448542 [EM]>>> [E:33131i S:45885 M:240345017 (Ack:209591797)] (S) Msg RX from 1:0000000000000001 [CFC8] --- Type 0002:05 (BDX:ReceiveAccept)
D: 448555 [SWU]BDX::SendMessage
I: 448558 [EM]<<< [E:33131i S:45885 M:209591798 (Ack:240345017)] (S) Msg TX to 1:0000000000000001 [CFC8] --- Type 0002:10 (BDX:BlockQuery)
I: 448571 [IN](S) Sending msg 209591798 on secure session with LSID: 45885
I: 448924 [EM]>>> [E:33131i S:45885 M:240345018 (Ack:209591798)] (S) Msg RX from 1:0000000000000001 [CFC8] --- Type 0002:11 (BDX:Block)
E: Failed to get device for area '"mcuboot_secondary"'
E: ***** BUS FAULT *****
E:   Instruction bus error
E: r0/a1:  0x00000000  r1/a2:  0x200315b8  r2/a3:  0x200315bc
E: r3/a4:  0x843901b1 r12/ip:  0x000d1838 r14/lr:  0x000a2223
E:  xpsr:  0x410f0000
E: s[ 0]:  0x00000000  s[ 1]:  0x00000000  s[ 2]:  0x00000000  s[ 3]:  0x00000000
E: s[ 4]:  0x00000000  s[ 5]:  0x00000000  s[ 6]:  0x00000000  s[ 7]:  0x00000000
E: s[ 8]:  0x00000000  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00000000
E: s[12]:  0x00000000  s[13]:  0x00000000  s[14]:  0x00000000  s[15]:  0x00000000
E: fpscr:  0x00000000
E: Faulting instruction address (r15/pc): 0x843901b0
E: >>> ZEPHYR FATAL ERROR 27: Unknown error on CPU 0
E: Current thread: 0x200145b0 (CHIP)
E: Halting system

  • I am sorry for this, I thought I already typed and asked you for more info but seems like my reply did not make it here.

    Can you please show us what exactly you modified and how to replicate this here so that we can try to test that.

  • Hi, I'm sorry for replying so late; I have purchased one MX25R64 from the purchasing department;

    I welded it onto the customer board, and the upgrade function is running normally;

    The software version and hardware version have been successfully upgraded to 11;

    Here are some screenshots of the successful upgrade:

    [1698737375.911602][28801:28801] CHIP:DMG: AccessControl: checking f=1 a=c s=0x0000000000000002 t= c=0x0000_0029 e=0 p=o
    [1698737375.911636][28801:28801] CHIP:DMG: AccessControl: allowed
    [1698737375.911663][28801:28801] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_0029 Command=0x0000_0000
    [1698737375.911714][28801:28801] CHIP:ZCL: OTA Provider received QueryImage
    [1698737375.911732][28801:28801] CHIP:ZCL:   VendorID: 0xfff1
    [1698737375.911750][28801:28801] CHIP:ZCL:   ProductID: 32773
    [1698737375.911768][28801:28801] CHIP:ZCL:   SoftwareVersion: 11
    [1698737375.911785][28801:28801] CHIP:ZCL:   ProtocolsSupported: [
    [1698737375.911807][28801:28801] CHIP:ZCL:     0
    [1698737375.911826][28801:28801] CHIP:ZCL:   ]
    [1698737375.911844][28801:28801] CHIP:ZCL:   HardwareVersion: 11
    [1698737375.911861][28801:28801] CHIP:ZCL:   Location: XX
    [1698737375.911880][28801:28801] CHIP:ZCL:   RequestorCanConsent: 0
    [1698737375.912104][28801:28801] CHIP:SWU: Generated updateToken: 52D10454D92C6E3C3E092478A2F016
    [1698737375.912133][28801:28801] CHIP:BDX: Start polling for messages
    [1698737375.912172][28801:28801] CHIP:DMG: Command handler moving to [ Preparing]
    [1698737375.912198][28801:28801] CHIP:DMG: Command handler moving to [AddingComm]
    [1698737375.912233][28801:28801] CHIP:DMG: Command handler moving to [AddedComma]
    [1698737375.912301][28801:28801] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0
    [1698737375.912383][28801:28801] CHIP:EM: <<< [E:445r S:7588 M:210928960 (Ack:182417346)] (S) Msg TX to 1:0000000000000002 [90AD] --- Type 0001:09 (IM:InvokeCommandResponse)
    [1698737375.912422][28801:28801] CHIP:IN: (S) Sending msg 210928960 on secure session with LSID: 7588
    [1698737375.912574][28801:28801] CHIP:DMG: Command handler moving to [CommandSen]
    [1698737375.912599][28801:28801] CHIP:DMG: Command handler moving to [AwaitingDe]
    [1698737376.115203][28801:28801] CHIP:EM: >>> [E:445r S:7588 M:182417347 (Ack:210928960)] (S) Msg RX from 1:0000000000000002 [90AD] --- Type 0000:10 (SecureChannel:StandaloneAck)
    [1698737376.115258][28801:28801] CHIP:EM: Found matching exchange: 445r, Delegate: (nil)
    [1698737376.115312][28801:28801] CHIP:EM: Rxd Ack; Removing MessageCounter:210928960 from Retrans Table on exchange 445r
    

    However, I need to use is is25lp80d;

    Although this may take up your time, could you please teach me how to set the parameters of QSPI? Can you explain to me how to obtain these parameters from the documentation?

    As shown in the following figure, how to set "??"

    data Link: www.findic.com/.../mQG73yJYQ

    &qspi {
    	status = "okay";
    	pinctrl-0 = <&qspi_default>;
    	pinctrl-1 = <&qspi_sleep>;
    	pinctrl-names = "default", "sleep";
    	is25lp: is25lp80d@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 = [ /* How to set it up??????????*/
    		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, let me add:

    I tried to modify QSPI as follows, but the upgrade failed:

    I have replaced the FLASH IC on the customer board, so I believe the problem is due to the QSPI configuration, as it works normally when I use the MX25.

    &qspi {
    	status = "okay";
    	pinctrl-0 = <&qspi_default>;
    	pinctrl-1 = <&qspi_sleep>;
    	pinctrl-names = "default", "sleep";
    	is25lp: is25lp80d@0 {
    		compatible = "nordic,qspi-nor";
    		reg = <0>;
    		/* MX25R64 supports only pp and pp4io */
    		writeoc = "pp";//"pp4io";
    		/* MX25R64 supports all readoc options */
    		readoc = "fastread";//"read4io";
    		sck-frequency = <8000000>;
    		jedec-id = [9D 60 14];//c2 28 17
    		sfdp-bfp = [
    		e5 20 f9 ff  ff ff 7f 00  44 eb 08 6b  08 3b 80 bb
    		fe ff ff ff  ff ff 00 ff  ff ff 44 eb  0c 20 0f 52
    		10 d8 00 ff  43 32 a5 00  82 d8 01 a7  ec 8d 69 4c
    		7a 75 7a 75  f7 a2 d5 5c  4a c2 2c ff  e1 30 60 80 
    	  /*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 = <8388608>;//// 8 Mbits. 1Mbit = 1048576
    		has-dpd;
    		t-enter-dpd = <10000>;
    		t-exit-dpd = <35000>;
    	};
    };

    error info:

    uart:~$ 
    uart:~$ 
    uart:~$ 
    uart:~$ matter ota query
    I: 577244 [SWU]Triggered immediate OTA query for fabric: 0x1
    I: 577250 [SWU]Stopping the Periodic Query timer
    I: 577254 [SWU]Starting the watchdog timer, timeout: 21600 seconds
    D: 577260 [SWU]Establishing session to provider node ID 0x0000000000000001 on fabric index 1
    I: 577268 [DIS]Found an existing secure session to [1:0000000000000001]!
    D: 577275 [DIS]OperationalSessionSetup[1:0000000000000001]: State change 1 --> 5
    I: 577285 [EM]<<< [E:19039i S:37652 M:178785162] (S) Msg TX to 1:0000000000000001 [90AD] --- Type 0001:08 (IM:InvokeCommandRequest)
    I: 577297 [IN](S) Sending msg 178785162 on secure session with LSID: 37652
    uart:~$ I: 577377 [EM]>>> [E:19039i S:37652 M:79216172 (Ack:178785162)] (S) Msg RX from 1:0000000000000001 [90AD] --- Type 0001:09 (IM:InvokeCommandResponse)
    I: 577391 [DMG]Received Command Response Data, Endpoint=0 Cluster=0x0000_0029 Command=0x0000_0001
    D: 577400 [SWU]QueryImageResponse:
    D: 577403 [SWU]  status: 0
    D: 577406 [SWU]  imageURI: bdx://0000000000000001//home/yida/nordic/project/xlc-matter-d/xlc-matter/build_3/zephyr/matter.ota
    D: 577417 [SWU]  softwareVersion: 12
    D: 577420 [SWU]  softwareVersionString: R1.2
    D: 577424 [SWU]  updateToken: 32
    D: 577427 [SWU]  userConsentNeeded: 0
    D: 577430 [SWU]  metadataForRequestor: 0
    D: 577434 [SWU]Update available from version 11 to 12
    I: 577440 [EM]<<< [E:19039i S:37652 M:178785163 (Ack:79216172)] (S) Msg TX to 1:0000000000000001 [90AD] --- Type 0000:10 (SecureChannel:StandaloneAck)
    I: 577453 [IN](S) Sending msg 178785163 on secure session with LSID: 37652
    D: 577461 [SWU]Establishing session to provider node ID 0x0000000000000001 on fabric index 1
    I: 577470 [DIS]Found an existing secure session to [1:0000000000000001]!
    D: 577477 [DIS]OperationalSessionSetup[1:0000000000000001]: State change 1 --> 5
    D: 577484 [SWU]BDX::SendMessage
    I: 577488 [EM]<<< [E:19040i S:37652 M:178785164] (S) Msg TX to 1:0000000000000001 [90AD] --- Type 0002:04 (BDX:ReceiveInit)
    I: 577499 [IN](S) Sending msg 178785164 on secure session with LSID: 37652
    I: 577657 [EM]>>> [E:19040i S:37652 M:79216173 (Ack:178785164)] (S) Msg RX from 1:0000000000000001 [90AD] --- Type 0002:05 (BDX:ReceiveAccept)
    D: 577670 [SWU]BDX::SendMessage
    I: 577674 [EM]<<< [E:19040i S:37652 M:178785165 (Ack:79216173)] (S) Msg TX to 1:0000000000000001 [90AD] --- Type 0002:10 (BDX:BlockQuery)
    I: 577686 [IN](S) Sending msg 178785165 on secure session with LSID: 37652
    I: 577946 [EM]>>> [E:19040i S:37652 M:79216174 (Ack:178785165)] (S) Msg RX from 1:0000000000000001 [90AD] --- Type 0002:11 (BDX:Block)
    D: 577959 [SWU]Downloaded 944/913833 bytes
    D: 577963 [SWU]BDX::SendMessage
    I: 577966 [EM]<<< [E:19040i S:37652 M:178785166 (Ack:79216174)] (S) Msg TX to 1:0000000000000001 [90AD] --- Type 0002:10 (BDX:BlockQuery)
    I: 577978 [IN](S) Sending msg 178785166 on secure session with LSID: 37652
    I: 578293 [EM]>>> [E:19040i S:37652 M:79216175 (Ack:178785166)] (S) Msg RX from 1:0000000000000001 [90AD] --- Type 0002:11 (BDX:Block)
    E: Error -5 while erasing page
    E: stream_flash_erase_page err -5 offset=0x00000000
    E: stream_flash_buffered_write error -5
    E: Error -5 while erasing page
    E: Unable to clean up dfu_target
    D: 579391 [SWU]BDX::SendMessage
    I: 579395 [EM]<<< [E:19040i S:37652 M:178785167 (Ack:79216175)] (S) Msg TX to 1:0000000000000001 [90AD] --- Type 0000:40 (SecureChannel:StatusReport)
    I: 579410 [IN](S) Sending msg 178785167 on secure session with LSID: 37652
    E: 579419 [BDX]TransferSession error
    I: 579425 [SWU]Unknown idle state reason so set the periodic timer for a next attempt
    I: 579434 [SWU]Stopping the watchdog timer
    I: 579438 [SWU]Starting the periodic query timer, timeout: 86400 seconds
    E: Error -5 while erasing page
    E: Unable to clean up dfu_target
    E: 579986 [DL]Long dispatch time: 1140 ms, for event type 3
    D: 579997 [IN]Received a duplicate message with MessageCounter:79216175 on exchange 19040i
    I: 580005 [EM]>>> [E:19040i S:37652 M:79216175 (Ack:178785166)] (S) Msg RX from 1:0000000000000001 [90AD] --- Type 0002:11 (BDX:Block)
    I: 580017 [EM]<<< [E:19040i S:37652 M:178785168 (Ack:79216175)] (S) Msg TX to 1:0000000000000001 [90AD] --- Type 0000:10 (SecureChannel:StandaloneAck)
    I: 580031 [IN](S) Sending msg 178785168 on secure session with LSID: 37652
    I: 580039 [EM]>>> [E:19040i S:37652 M:79216176 (Ack:178785167)] (S) Msg RX from 1:0000000000000001 [90AD] --- Type 0000:10 (SecureChannel:StandaloneAck)
    

  • Hi

    I've been assigned to this case now to check your QSPI config. Do you have a link to the IS25LP80D flash IC datasheet so I can give it a read to make sure all of this looks correct. The error messages you're seeing (-5) usually points to a I/O error, so what pins are you using for connecting the flash to your nRF52840?

    Best regards,

    Simon

  • Hi,

    Thank you.

    I have read the manuals for MX25R64 and IS25LP080D, so I know their pins are compatible; So, I didn't replace the customer board, I just replaced the Flash IC; When using MX25R64, the OTA function runs successfully;

    I will upload the manual for IS25LP080D, thank you.

    I will upload my QSPI configuration and pin configuration;

    I changed the writeoc to another one for testing, but the results were all unsuccessful;

    .

    &qspi {
    	status = "okay";
    	pinctrl-0 = <&qspi_default>;
    	pinctrl-1 = <&qspi_sleep>;
    	pinctrl-names = "default", "sleep";
    	is25lp: is25lp80d@0 {
    		compatible = "nordic,qspi-nor";
    		reg = <0>;
    		/* MX25R64 supports only pp and pp4io */
    		writeoc = "pp";//"pp4io";
    		/* MX25R64 supports all readoc options */
    		readoc = "fastread";//"read4io";
    		sck-frequency = <8000000>;
    		jedec-id = [9D 60 14];//c2 28 17
    		sfdp-bfp = [
    		e5 20 f9 ff  ff ff 7f 00  44 eb 08 6b  08 3b 80 bb
    		fe ff ff ff  ff ff 00 ff  ff ff 44 eb  0c 20 0f 52
    		10 d8 00 ff  43 32 a5 00  82 d8 01 a7  ec 8d 69 4c
    		7a 75 7a 75  f7 a2 d5 5c  4a c2 2c ff  e1 30 60 80 
    	  /*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 = <8388608>;//// 8 Mbits. 1Mbit = 1048576
    		has-dpd;
    		t-enter-dpd = <10000>;
    		t-exit-dpd = <35000>;
    	};
    };
    
    -----------------------------------------------
    pin config
    
    qspi_default: qspi_default {
    		group1 {
    			psels = <NRF_PSEL(QSPI_SCK, 0, 17)>,
    				<NRF_PSEL(QSPI_IO0, 0, 20)>,
    				<NRF_PSEL(QSPI_IO1, 0, 13)>,
    				<NRF_PSEL(QSPI_IO2, 0, 22)>,
    				<NRF_PSEL(QSPI_IO3, 0, 24)>,
    				<NRF_PSEL(QSPI_CSN, 0, 15)>;
    			nordic,drive-mode = <NRF_DRIVE_H0H1>;
    		};
    	};
    
    	qspi_sleep: qspi_sleep {
    		group1 {
    			psels = <NRF_PSEL(QSPI_SCK, 0, 17)>,
    				<NRF_PSEL(QSPI_IO0, 0, 20)>,
    				<NRF_PSEL(QSPI_IO1, 0, 13)>,
    				<NRF_PSEL(QSPI_IO2, 0, 22)>,
    				<NRF_PSEL(QSPI_IO3, 0, 24)>;
    			low-power-enable;
    		};
    		group2 {
    			psels = <NRF_PSEL(QSPI_CSN, 0, 15)>;
    			low-power-enable;
    			bias-pull-up;
    		};
    	};

    25LP-WP080D-040D-020D.pdf

Related