problem with UART update on nRF52840

Good morning,

in our project we would like to implement a DFU system of our Nordic 52840 through UART. In the final version of the board the 52840 will be connected to another MCU through serial, but for the moment we are updating the Nordic through a USB serial adapted connected to the rx/tx pins of the Nordic MCU and using the nrfutil.

What we observe is the following:

1) If I upload the fw through nrfutil after having loaded the SD and the BL itself, the procedure is successful in about 25 seconds

2) If I cancel the DFU procedure while it is ongoing and then I repeat it, only the first SLIP packets are exchanged and the first 4k data batch is sent. When the CRC is requested to the Nordic, no answer is apparently received and the program exits. Please see the attached log, obtained with the -v-v-v-v nrfutil option. The command I use is: 

nrfutil -v -v -v -v dfu serial -cd 1 -p COM36 -fc 0 -b 115200 -pkg NordicPackage.zip

the used zip has been signed with a proprietary private key (.pem file) and of course the bootloader has been compiled with the related public key. I believe I am safe on the public/private key side cause otherwise the first update would not be successful. We also tried the procedure with the usb-serial option, but the behaviour seems to be the same.

Can you please tell me if you have any idea on what the problem is? I would (naively?) expect that if I interrupt the UART DFU procedure in the middle I should then be able to safely repeat it.

Please find attached:

the sdk_config.h used (it has been changed wrt the original one to adapt it to the project's needs)

the aforementioned log file

Thank you.

Kind regards,

Stefano

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
C:\work\vdf_40170_ca\Prj\tools\App_Generator>nrfutil -v -v -v -v dfu serial -cd 1 -p COM36 -fc 0 -b 115200 -pkg P567_FPNFC_Mesh_App_0_0_0_JustNordic.zip
2023-02-17 09:03:42,181 Using board at serial port: COM36
2023-02-17 09:03:42,190 Sending Application image.
2023-02-17 09:04:13,673 SLIP: --> [9, 1]
2023-02-17 09:04:13,686 SLIP: <-- [96, 9, 1, 1]
2023-02-17 09:04:13,686 Serial: Set Packet Receipt Notification 0
2023-02-17 09:04:13,686 SLIP: --> [2, 0, 0]
2023-02-17 09:04:13,702 SLIP: <-- [96, 2, 1]
2023-02-17 09:04:13,702 SLIP: --> [7]
2023-02-17 09:04:13,718 SLIP: <-- [96, 7, 1, 131, 0]
2023-02-17 09:04:13,718 Sending init packet...
2023-02-17 09:04:13,718 Serial: Selecting Object: type:1
2023-02-17 09:04:13,719 SLIP: --> [6, 1]
2023-02-17 09:04:13,733 SLIP: <-- [96, 6, 1, 0, 2, 0, 0, 141, 0, 0, 0, 133, 3, 198, 153]
2023-02-17 09:04:13,733 Serial: Object selected: max_size:512 offset:141 crc:2579891077
2023-02-17 09:04:13,734 SLIP: --> [4]
2023-02-17 09:04:13,749 SLIP: <-- [96, 4, 1]
2023-02-17 09:04:13,749 Sending firmware file...
2023-02-17 09:04:13,750 Serial: Selecting Object: type:2
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

7282.sdk_config.h