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

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
2023-02-17 09:04:13,750 SLIP: --> [6, 2]
2023-02-17 09:04:13,766 SLIP: <-- [96, 6, 1, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
2023-02-17 09:04:13,766 Serial: Object selected:  max_size:4096 offset:0 crc:0
2023-02-17 09:04:13,766 SLIP: --> [1, 2, 0, 16, 0, 0]
2023-02-17 09:04:13,781 SLIP: <-- [96, 1, 1]
2023-02-17 09:04:13,781 Serial: Streaming Data: len:4096 offset:0 crc:0x00000000
2023-02-17 09:04:13,781 SLIP: --> [8, 0, 253, 3, 32, 9, 17, 4, 0, 49, 17, 4, 0, 51, 17, 4, 0, 53, 17, 4, 0, 55, 17, 4, 0, 57, 17, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59, 17, 4, 0, 61, 17, 4, 0, 0, 0, 0, 0, 63, 17, 4, 0, 65, 17, 4, 0]
2023-02-17 09:04:13,783 SLIP: --> [8, 67, 17, 4, 0, 67, 17, 4, 0, 101, 34, 4, 0, 65, 40, 4, 0, 67, 17, 4, 0, 67, 17, 4, 0, 177, 32, 4, 0, 133, 35, 4, 0, 67, 17, 4, 0, 53, 37, 4, 0, 137, 207, 2, 0, 67, 17, 4, 0, 67, 17, 4, 0, 67, 17, 4, 0, 67, 17, 4, 0, 67, 17, 4, 0]
2023-02-17 09:04:13,788 SLIP: --> [8, 105, 53, 4, 0, 89, 178, 3, 0, 65, 12, 3, 0, 197, 28, 4, 0, 41, 179, 3, 0, 67, 17, 4, 0, 153, 24, 4, 0, 67, 17, 4, 0, 67, 17, 4, 0, 67, 17, 4, 0, 73, 37, 4, 0, 67, 17, 4, 0, 221, 34, 4, 0, 67, 17, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0]
2023-02-17 09:04:13,794 SLIP: --> [8, 67, 17, 4, 0, 67, 17, 4, 0, 67, 17, 4, 0, 67, 17, 4, 0, 67, 17, 4, 0, 67, 17, 4, 0, 67, 17, 4, 0, 67, 17, 4, 0, 67, 17, 4, 0, 67, 17, 4, 0, 41, 180, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 17, 4, 0, 0, 0, 0, 0, 67, 17, 4, 0]
2023-02-17 09:04:13,800 SLIP: --> [8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
2023-02-17 09:04:13,805 SLIP: --> [8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
2023-02-17 09:04:13,811 SLIP: --> [8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
2023-02-17 09:04:13,816 SLIP: --> [8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
2023-02-17 09:04:13,823 SLIP: --> [8, 16, 181, 5, 76, 35, 120, 51, 185, 4, 75, 19, 177, 4, 72, 175, 243, 0, 128, 1, 35, 35, 112, 16, 189, 72, 57, 0, 32, 0, 0, 0, 0, 112, 93, 5, 0, 8, 181, 3, 75, 27, 177, 3, 73, 3, 72, 175, 243, 0, 128, 8, 189, 0, 0, 0, 0, 76, 57, 0, 32, 112, 93, 5, 0]
2023-02-17 09:04:13,828 SLIP: --> [8, 21, 75, 0, 43, 8, 191, 19, 75, 157, 70, 163, 245, 128, 58, 0, 33, 139, 70, 15, 70, 19, 72, 20, 74, 18, 26, 38, 240, 145, 252, 15, 75, 0, 43, 0, 208, 152, 71, 14, 75, 0, 43, 0, 208, 152, 71, 0, 32, 0, 33, 4, 0, 13, 0, 13, 72, 0, 40, 2, 208, 12, 72, 40, 240]
2023-02-17 09:04:13,834 SLIP: --> [8, 95, 254, 38, 240, 65, 248, 32, 0, 41, 0, 33, 240, 41, 254, 38, 240, 43, 248, 0, 191, 0, 0, 8, 0, 0, 253, 3, 32, 0, 0, 0, 0, 0, 0, 0, 0, 72, 57, 0, 32, 116, 205, 0, 32, 65, 239, 4, 0, 85, 255, 4, 0, 56, 181, 4, 70, 69, 24, 172, 66, 1, 209, 0, 32]
2023-02-17 09:04:13,840 SLIP: --> [8, 5, 224, 20, 248, 1, 11, 23, 240, 41, 254, 0, 40, 245, 208, 56, 189, 56, 181, 5, 70, 12, 70, 21, 240, 65, 250, 41, 70, 21, 240, 68, 250, 160, 66, 52, 191, 0, 32, 1, 32, 56, 189, 55, 181, 13, 70, 4, 70, 104, 185, 169, 178, 0, 34, 32, 70, 1, 240, 83, 253, 1, 33, 141, 248]
2023-02-17 09:04:13,846 SLIP: --> [8, 7, 0, 13, 241, 7, 0, 255, 247, 213, 255, 3, 176, 48, 189, 255, 247, 209, 255, 0, 40, 249, 209, 236, 231, 7, 181, 12, 72, 3, 33, 255, 247, 228, 255, 11, 75, 27, 104, 91, 4, 13, 213, 10, 75, 27, 104, 3, 43, 9, 221, 9, 75, 9, 74, 211, 248, 4, 53, 9, 73, 0, 146, 4, 32]
2023-02-17 09:04:13,851 SLIP: --> [8, 87, 34, 13, 240, 59, 249, 3, 176, 93, 248, 4, 251, 68, 18, 5, 0, 224, 45, 0, 32, 220, 45, 0, 32, 0, 16, 1, 64, 194, 17, 5, 0, 180, 17, 5, 0, 1, 72, 5, 33, 255, 247, 191, 191, 71, 18, 5, 0, 7, 181, 12, 72, 3, 33, 255, 247, 184, 255, 11, 75, 27, 104, 91, 4]
2023-02-17 09:04:13,857 SLIP: --> [8, 13, 213, 10, 75, 27, 104, 3, 43, 9, 221, 9, 75, 9, 74, 211, 248, 4, 53, 9, 73, 0, 146, 4, 32, 105, 34, 13, 240, 15, 249, 3, 176, 93, 248, 4, 251, 76, 18, 5, 0, 224, 45, 0, 32, 220, 45, 0, 32, 0, 16, 1, 64, 195, 17, 5, 0, 180, 17, 5, 0, 1, 72, 3, 33]
2023-02-17 09:04:13,862 SLIP: --> [8, 255, 247, 147, 191, 79, 18, 5, 0, 31, 181, 2, 35, 141, 248, 5, 0, 141, 248, 4, 48, 56, 34, 141, 248, 10, 48, 5, 33, 189, 248, 4, 48, 173, 248, 8, 32, 2, 168, 173, 248, 11, 48, 255, 247, 126, 255, 5, 176, 93, 248, 4, 251, 21, 240, 178, 185, 8, 181, 23, 240, 183, 253, 128, 178]
2023-02-17 09:04:13,868 SLIP: --> [8, 8, 189, 7, 181, 13, 241, 7, 0, 23, 240, 114, 253, 32, 185, 157, 248, 7, 0, 3, 176, 93, 248, 4, 251, 0, 32, 250, 231, 112, 181, 13, 70, 136, 176, 20, 70, 0, 42, 69, 208, 54, 41, 39, 208, 7, 216, 1, 41, 0, 240, 140, 128, 25, 41, 117, 208, 23, 240, 74, 253, 58, 224, 55, 41]
2023-02-17 09:04:13,874 SLIP: --> [8, 58, 208, 56, 41, 248, 209, 16, 70, 0, 240, 62, 254, 196, 178, 255, 44, 72, 78, 173, 248, 20, 0, 68, 209, 51, 104, 88, 4, 42, 213, 70, 75, 27, 104, 3, 43, 38, 221, 69, 75, 69, 74, 211, 248, 4, 53, 0, 146, 156, 34, 68, 73, 4, 32, 13, 240, 161, 248, 27, 224, 17, 70, 2, 32]
2023-02-17 09:04:13,879 SLIP: --> [8, 0, 240, 92, 251, 176, 185, 59, 75, 27, 104, 93, 4, 13, 213, 58, 75, 27, 104, 3, 43, 9, 221, 57, 75, 59, 74, 211, 248, 4, 53, 0, 146, 129, 34, 56, 73, 4, 32, 13, 240, 137, 248, 23, 240, 17, 253, 0, 32, 255, 247, 50, 255, 8, 176, 112, 189, 17, 70, 3, 32, 0, 240, 62, 251]
2023-02-17 09:04:13,885 SLIP: --> [8, 0, 40, 247, 209, 43, 75, 27, 104, 92, 4, 238, 213, 42, 75, 27, 104, 3, 43, 234, 221, 41, 75, 45, 74, 211, 248, 4, 53, 0, 146, 141, 34, 223, 231, 2, 35, 173, 248, 27, 0, 5, 33, 6, 168, 141, 248, 26, 48, 173, 248, 24, 80, 255, 247, 249, 254, 51, 104, 89, 4, 218, 213, 30, 75]
2023-02-17 09:04:13,891 SLIP: --> [8, 27, 104, 3, 43, 214, 221, 157, 248, 21, 32, 28, 75, 29, 73, 211, 248, 4, 53, 205, 233, 1, 66, 30, 74, 0, 146, 4, 32, 169, 34, 13, 240, 77, 248, 199, 231, 255, 247, 109, 255, 99, 120, 131, 66, 194, 209, 17, 75, 27, 104, 90, 4, 190, 213, 16, 75, 27, 104, 3, 43, 186, 221, 15, 75]
2023-02-17 09:04:13,896 SLIP: --> [8, 20, 74, 211, 248, 4, 53, 0, 146, 179, 34, 146, 231, 255, 247, 89, 255, 99, 120, 131, 66, 174, 209, 7, 75, 27, 104, 91, 4, 170, 213, 6, 75, 27, 104, 3, 43, 166, 221, 5, 75, 11, 74, 211, 248, 4, 53, 0, 146, 188, 34, 126, 231, 224, 45, 0, 32, 220, 45, 0, 32, 0, 16, 1, 64]
2023-02-17 09:04:13,903 SLIP: --> [8, 253, 17, 5, 0, 180, 17, 5, 0, 205, 17, 5, 0, 229, 17, 5, 0, 24, 18, 5, 0, 59, 18, 5, 0, 58, 18, 5, 0, 112, 181, 14, 70, 21, 70, 0, 36, 165, 66, 6, 235, 4, 0, 2, 208, 23, 240, 160, 252, 8, 177, 160, 178, 112, 189, 1, 52, 244, 231, 8, 70, 17, 70, 8, 177]
2023-02-17 09:04:13,909 SLIP: --> [8, 255, 247, 120, 190, 112, 71, 7, 181, 141, 248, 7, 16, 13, 241, 7, 0, 1, 33, 255, 247, 111, 254, 3, 176, 93, 248, 4, 251, 23, 240, 120, 188, 31, 40, 138, 191, 5, 75, 79, 240, 160, 67, 0, 240, 31, 0, 211, 248, 16, 53, 35, 250, 0, 240, 0, 240, 1, 0, 112, 71, 0, 3, 0, 80]
2023-02-17 09:04:13,914 SLIP: --> [8, 4, 75, 26, 120, 26, 177, 152, 120, 0, 240, 1, 0, 112, 71, 1, 32, 250, 231, 0, 191, 101, 57, 0, 32, 12, 75, 27, 104, 91, 4, 7, 181, 14, 213, 11, 75, 27, 104, 3, 43, 10, 221, 10, 75, 10, 74, 211, 248, 4, 53, 10, 73, 0, 146, 4, 32, 64, 242, 63, 18, 12, 240, 190, 255]
2023-02-17 09:04:13,919 SLIP: --> [8, 7, 75, 0, 34, 90, 112, 3, 176, 93, 248, 4, 251, 224, 45, 0, 32, 220, 45, 0, 32, 0, 16, 1, 64, 121, 18, 5, 0, 102, 18, 5, 0, 101, 57, 0, 32, 112, 181, 78, 77, 44, 120, 1, 44, 136, 176, 46, 70, 52, 208, 2, 44, 58, 208, 75, 78, 52, 120, 98, 30, 1, 42, 43, 216]
2023-02-17 09:04:13,926 SLIP: --> [8, 163, 30, 92, 66, 92, 65, 3, 37, 56, 35, 141, 248, 20, 80, 141, 248, 21, 64, 173, 248, 24, 48, 2, 35, 141, 248, 26, 48, 5, 33, 189, 248, 20, 48, 173, 248, 27, 48, 6, 168, 255, 247, 31, 254, 62, 75, 27, 104, 90, 4, 15, 213, 61, 75, 27, 104, 171, 66, 11, 221, 60, 75, 61, 74]
2023-02-17 09:04:13,931 SLIP: --> [8, 211, 248, 4, 53, 60, 73, 0, 146, 205, 233, 1, 84, 177, 34, 4, 32, 12, 240, 116, 255, 0, 35, 51, 112, 8, 176, 112, 189, 2, 32, 30, 240, 71, 252, 0, 40, 199, 209, 2, 35, 43, 112, 196, 231, 30, 240, 128, 252, 0, 40, 192, 209, 49, 75, 24, 104, 154, 136, 6, 144, 155, 121, 141, 248]
2023-02-17 09:04:13,937 SLIP: --> [8, 30, 48, 32, 70, 173, 248, 28, 32, 30, 240, 184, 252, 38, 75, 0, 40, 51, 209, 43, 74, 105, 120, 146, 120, 27, 104, 145, 66, 3, 244, 128, 67, 24, 209, 107, 177, 33, 75, 27, 104, 4, 43, 9, 221, 32, 75, 37, 74, 211, 248, 4, 53, 32, 73, 0, 146, 5, 32, 130, 34, 12, 240, 62, 255]
2023-02-17 09:04:13,943 SLIP: --> [8, 0, 35, 8, 33, 6, 168, 141, 248, 30, 48, 32, 240, 177, 252, 0, 35, 51, 112, 144, 231, 123, 177, 21, 75, 27, 104, 4, 43, 11, 221, 20, 75, 211, 248, 4, 53, 205, 233, 1, 33, 23, 74, 0, 146, 18, 73, 136, 34, 5, 32, 12, 240, 35, 255, 2, 35, 227, 231, 27, 104, 89, 4, 13, 213]
2023-02-17 09:04:13,948 SLIP: --> [8, 10, 75, 27, 104, 4, 43, 9, 221, 9, 75, 16, 74, 211, 248, 4, 53, 9, 73, 0, 146, 5, 32, 143, 34, 12, 240, 16, 255, 1, 35, 208, 231, 105, 57, 0, 32, 100, 57, 0, 32, 224, 45, 0, 32, 220, 45, 0, 32, 0, 16, 1, 64, 24, 18, 5, 0, 102, 18, 5, 0, 152, 22, 5, 0]
2023-02-17 09:04:13,954 SLIP: --> [8, 213, 200, 0, 32, 159, 18, 5, 0, 183, 18, 5, 0, 235, 18, 5, 0, 45, 233, 240, 65, 5, 70, 198, 176, 12, 70, 0, 41, 0, 240, 132, 128, 68, 75, 15, 136, 26, 104, 18, 244, 128, 79, 152, 70, 23, 208, 66, 75, 27, 104, 3, 43, 19, 221, 65, 75, 138, 120, 211, 248, 4, 53, 2, 146]
2023-02-17 09:04:13,960 SLIP: --> [8, 160, 241, 54, 2, 62, 73, 210, 178, 4, 32, 81, 248, 34, 32, 1, 146, 60, 74, 0, 146, 60, 73, 64, 242, 107, 18, 12, 240, 207, 254, 55, 45, 101, 209, 163, 120, 30, 70, 0, 43, 53, 208, 216, 248, 0, 32, 82, 4, 49, 213, 49, 74, 18, 104, 3, 42, 45, 221, 3, 51, 51, 74, 128, 43]
2023-02-17 09:04:13,965 SLIP: --> [8, 40, 191, 128, 35, 210, 248, 0, 192, 32, 70, 5, 170, 3, 235, 4, 14, 16, 248, 1, 27, 79, 234, 17, 24, 1, 240, 15, 1, 28, 249, 8, 128, 130, 248, 0, 128, 28, 249, 1, 16, 81, 112, 134, 69, 2, 241, 2, 2, 238, 209, 5, 169, 0, 34, 1, 248, 19, 32, 32, 75, 36, 74, 211, 248]
2023-02-17 09:04:13,971 SLIP: --> [8, 4, 53, 1, 146, 35, 74, 2, 145, 0, 146, 31, 73, 79, 244, 185, 114, 4, 32, 12, 240, 147, 254, 179, 28, 26, 10, 141, 248, 21, 32, 141, 248, 23, 112, 5, 34, 5, 169, 0, 32, 63, 10, 141, 248, 20, 80, 141, 248, 22, 48, 141, 248, 24, 112, 255, 247, 128, 254, 0, 34, 5, 33, 5, 168]
2023-02-17 09:04:13,976 SLIP: --> [8, 1, 240, 111, 250, 5, 70, 94, 177, 3, 52, 2, 70, 49, 70, 32, 70, 1, 240, 103, 250, 50, 70, 5, 70, 33, 70, 0, 32, 255, 247, 109, 254, 41, 70, 0, 32, 255, 247, 111, 254, 70, 176, 189, 232, 240, 129, 0, 38, 209, 231, 0, 191, 224, 45, 0, 32, 220, 45, 0, 32, 0, 16, 1, 64]
2023-02-17 09:04:13,982 SLIP: --> [8, 184, 22, 5, 0, 6, 19, 5, 0, 102, 18, 5, 0, 228, 45, 0, 32, 217, 25, 5, 0, 37, 19, 5, 0, 3, 120, 2, 43, 2, 209, 64, 104, 25, 240, 219, 185, 1, 43, 250, 208, 112, 71, 0, 0, 8, 181, 33, 240, 193, 250, 3, 75, 0, 40, 20, 191, 2, 34, 1, 34, 26, 112, 8, 189]
2023-02-17 09:04:13,989 SLIP: --> [8, 100, 57, 0, 32, 14, 74, 0, 35, 50, 248, 51, 16, 129, 66, 3, 209, 2, 235, 195, 3, 88, 104, 112, 71, 1, 51, 13, 43, 244, 209, 1, 40, 8, 208, 2, 40, 8, 208, 3, 40, 8, 209, 2, 34, 5, 75, 3, 235, 194, 3, 239, 231, 0, 34, 249, 231, 1, 34, 247, 231, 2, 72, 112, 71]
2023-02-17 09:04:13,994 SLIP: --> [8, 220, 22, 5, 0, 196, 22, 5, 0, 45, 19, 5, 0, 255, 247, 22, 189, 55, 181, 20, 77, 43, 120, 19, 187, 19, 76, 163, 120, 165, 43, 19, 75, 27, 104, 12, 191, 90, 34, 165, 34, 91, 4, 162, 112, 14, 213, 16, 75, 27, 104, 4, 43, 10, 221, 15, 75, 15, 73, 211, 248, 4, 53, 1, 146]
2023-02-17 09:04:14,000 SLIP: --> [8, 14, 74, 0, 146, 5, 32, 204, 34, 12, 240, 248, 253, 163, 120, 107, 112, 1, 36, 44, 112, 255, 247, 70, 254, 32, 70, 3, 176, 48, 189, 0, 32, 251, 231, 0, 191, 105, 57, 0, 32, 213, 200, 0, 32, 224, 45, 0, 32, 220, 45, 0, 32, 0, 16, 1, 64, 102, 18, 5, 0, 63, 19, 5, 0]
2023-02-17 09:04:14,006 SLIP: --> [8, 240, 181, 57, 76, 35, 120, 135, 176, 203, 185, 98, 120, 186, 185, 227, 120, 54, 78, 12, 43, 30, 217, 51, 104, 90, 4, 14, 213, 52, 75, 27, 104, 3, 43, 10, 221, 51, 75, 52, 74, 211, 248, 4, 53, 51, 73, 0, 146, 4, 32, 79, 244, 211, 114, 12, 240, 193, 253, 1, 35, 35, 112, 0, 32]
2023-02-17 09:04:14,012 SLIP: --> [8, 1, 240, 192, 249, 16, 177, 0, 32, 1, 240, 12, 250, 255, 247, 10, 254, 7, 176, 240, 189, 1, 35, 42, 72, 99, 112, 79, 244, 0, 65, 20, 240, 33, 254, 51, 104, 39, 77, 19, 244, 128, 79, 22, 208, 32, 75, 27, 104, 3, 43, 18, 221, 226, 120, 31, 75, 5, 235, 194, 1, 53, 248, 50, 32]
2023-02-17 09:04:14,017 SLIP: --> [8, 211, 248, 4, 53, 73, 104, 1, 146, 31, 74, 2, 145, 0, 146, 27, 73, 79, 244, 216, 114, 4, 32, 12, 240, 145, 253, 51, 104, 226, 120, 91, 4, 53, 248, 50, 112, 19, 213, 18, 75, 27, 104, 3, 43, 15, 221, 5, 235, 194, 5, 16, 75, 106, 104, 211, 248, 4, 53, 1, 146, 19, 74, 0, 146]
2023-02-17 09:04:14,023 SLIP: --> [8, 14, 73, 2, 151, 79, 244, 202, 114, 4, 32, 12, 240, 119, 253, 0, 35, 5, 169, 54, 32, 141, 248, 22, 48, 173, 248, 20, 112, 255, 247, 120, 254, 227, 120, 1, 51, 227, 112, 170, 231, 101, 57, 0, 32, 224, 45, 0, 32, 220, 45, 0, 32, 0, 16, 1, 64, 98, 19, 5, 0, 102, 18, 5, 0]
2023-02-17 09:04:14,029 SLIP: --> [8, 108, 57, 0, 32, 220, 22, 5, 0, 114, 19, 5, 0, 141, 19, 5, 0, 8, 181, 7, 75, 7, 74, 8, 72, 0, 33, 25, 112, 89, 112, 217, 112, 20, 240, 174, 253, 24, 177, 189, 232, 8, 64, 25, 240, 214, 184, 8, 189, 101, 57, 0, 32, 25, 102, 2, 0, 68, 23, 5, 0, 45, 233, 240, 79]
2023-02-17 09:04:14,034 SLIP: --> [8, 4, 70, 207, 176, 13, 70, 0, 41, 0, 240, 165, 130, 131, 30, 1, 43, 0, 242, 32, 130, 75, 136, 18, 43, 1, 217, 0, 36, 8, 225, 1, 43, 26, 217, 0, 32, 255, 247, 77, 252, 105, 120, 6, 70, 1, 240, 10, 249, 104, 112, 0, 32, 173, 248, 32, 96, 255, 247, 67, 252, 105, 120, 6, 70]
2023-02-17 09:04:14,039 SLIP: --> [8, 1, 240, 0, 249, 189, 248, 32, 48, 104, 112, 67, 234, 6, 32, 107, 136, 173, 248, 32, 0, 2, 59, 107, 128, 106, 136, 114, 177, 13, 241, 34, 1, 0, 32, 255, 247, 251, 252, 107, 136, 152, 66, 1, 70, 213, 209, 106, 120, 13, 241, 34, 0, 1, 240, 245, 248, 104, 112, 0, 32, 255, 247, 33, 252]
2023-02-17 09:04:14,046 SLIP: --> [8, 107, 120, 131, 66, 201, 209, 180, 79, 181, 248, 2, 128, 59, 104, 3, 44, 3, 244, 128, 67, 62, 70, 0, 240, 125, 129, 195, 177, 175, 75, 27, 104, 3, 43, 20, 221, 189, 248, 32, 64, 173, 75, 32, 70, 211, 248, 4, 53, 5, 147, 255, 247, 167, 254, 171, 74, 1, 144, 0, 146, 205, 233, 2, 72]
2023-02-17 09:04:14,052 SLIP: --> [8, 5, 155, 169, 73, 79, 244, 24, 114, 4, 32, 12, 240, 215, 252, 167, 76, 111, 136, 1, 35, 163, 112, 51, 104, 3, 244, 128, 67, 0, 47, 64, 240, 222, 128, 187, 177, 157, 75, 27, 104, 3, 43, 19, 221, 189, 248, 32, 80, 155, 75, 40, 70, 211, 248, 4, 53, 5, 147, 255, 247, 131, 254, 156, 74]
2023-02-17 09:04:14,057 SLIP: --> [8, 0, 146, 205, 233, 1, 5, 5, 155, 151, 73, 64, 242, 5, 34, 4, 32, 12, 240, 180, 252, 189, 248, 32, 0, 6, 169, 30, 240, 123, 248, 0, 40, 89, 209, 51, 104, 157, 248, 26, 128, 189, 248, 24, 80, 88, 4, 193, 70, 35, 213, 223, 248, 40, 162, 218, 248, 0, 48, 3, 43, 29, 221, 223, 248]
2023-02-17 09:04:14,063 SLIP: --> [8, 32, 178, 40, 70, 219, 248, 4, 53, 5, 147, 255, 247, 91, 254, 137, 74, 5, 155, 1, 144, 0, 146, 205, 233, 2, 88, 131, 73, 64, 242, 221, 18, 4, 32, 12, 240, 139, 252, 51, 104, 205, 248, 20, 176, 19, 244, 128, 79, 3, 208, 218, 248, 0, 48, 3, 43, 94, 220, 54, 35, 141, 248, 52, 48]
2023-02-17 09:04:14,069 SLIP: --> [8, 9, 241, 2, 3, 27, 10, 141, 248, 55, 80, 5, 34, 45, 10, 13, 169, 0, 32, 8, 241, 2, 8, 141, 248, 53, 48, 141, 248, 56, 80, 141, 248, 54, 128, 255, 247, 106, 252, 0, 34, 5, 33, 13, 168, 1, 240, 89, 248, 5, 70, 185, 241, 0, 15, 10, 208, 2, 70, 73, 70, 7, 152, 1, 240]
2023-02-17 09:04:14,075 SLIP: --> [8, 80, 248, 7, 153, 5, 70, 74, 70, 0, 32, 255, 247, 86, 252, 41, 70, 0, 32, 255, 247, 88, 252, 0, 37, 148, 248, 0, 128, 184, 241, 0, 15, 32, 209, 255, 177, 227, 120, 100, 74, 1, 59, 50, 248, 51, 32, 189, 248, 32, 48, 154, 66, 22, 209, 97, 72, 20, 240, 0, 253, 51, 104, 132, 248]
2023-02-17 09:04:14,080 SLIP: --> [8, 1, 128, 89, 4, 14, 213, 85, 75, 27, 104, 3, 43, 10, 221, 84, 75, 91, 74, 211, 248, 4, 53, 84, 73, 0, 146, 4, 32, 64, 242, 57, 18, 12, 240, 44, 252, 0, 45, 0, 240, 148, 128, 80, 75, 0, 36, 156, 112, 32, 70, 79, 176, 189, 232, 240, 143, 82, 75, 7, 154, 211, 248, 0, 224]
2023-02-17 09:04:14,085 SLIP: --> [8, 184, 241, 128, 15, 196, 70, 13, 171, 40, 191, 79, 240, 128, 12, 12, 235, 2, 10, 24, 70, 146, 69, 3, 241, 2, 3, 17, 209, 0, 35, 0, 248, 28, 48, 5, 155, 72, 74, 211, 248, 4, 53, 1, 146, 71, 74, 2, 144, 0, 146, 61, 73, 79, 244, 239, 114, 4, 32, 12, 240, 255, 251, 124, 231]
2023-02-17 09:04:14,092 SLIP: --> [8, 18, 248, 1, 27, 79, 234, 17, 27, 1, 240, 15, 1, 30, 249, 11, 176, 3, 248, 2, 188, 30, 249, 1, 16, 3, 248, 1, 28, 218, 231, 27, 179, 223, 248, 184, 144, 217, 248, 0, 48, 3, 43, 29, 221, 189, 248, 32, 128, 43, 77, 64, 70, 213, 248, 4, 53, 5, 147, 255, 247, 163, 253, 52, 74]
2023-02-17 09:04:14,097 SLIP: --> [8, 5, 155, 1, 144, 205, 233, 2, 135, 0, 146, 39, 73, 79, 244, 4, 114, 4, 32, 12, 240, 211, 251, 51, 104, 19, 244, 128, 79, 168, 70, 3, 208, 217, 248, 0, 48, 3, 43, 5, 220, 57, 70, 8, 168, 30, 240, 188, 251, 5, 70, 113, 231, 35, 75, 186, 28, 211, 248, 0, 192, 128, 42, 13, 171]
2023-02-17 09:04:14,103 SLIP: --> [8, 40, 191, 128, 34, 13, 241, 32, 14, 0, 32, 29, 70, 30, 248, 1, 27, 79, 234, 17, 25, 1, 240, 15, 1, 28, 249, 9, 144, 131, 248, 0, 144, 1, 48, 28, 249, 1, 16, 89, 112, 130, 66, 3, 241, 2, 3, 237, 209, 0, 35, 5, 248, 18, 48, 20, 74, 216, 248, 4, 53, 1, 146, 19, 74]
2023-02-17 09:04:14,109 SLIP: --> [8, 0, 146, 9, 73, 2, 149, 64, 242, 17, 34, 4, 32, 12, 240, 150, 251, 202, 231, 165, 112, 1, 36, 107, 231, 224, 45, 0, 32, 220, 45, 0, 32, 0, 16, 1, 64, 174, 19, 5, 0, 102, 18, 5, 0, 101, 57, 0, 32, 228, 19, 5, 0, 13, 20, 5, 0, 220, 22, 5, 0, 108, 57, 0, 32]
2023-02-17 09:04:14,114 SLIP: --> [8, 99, 20, 5, 0, 228, 45, 0, 32, 217, 25, 5, 0, 37, 19, 5, 0, 50, 20, 5, 0, 27, 179, 223, 248, 232, 145, 217, 248, 0, 48, 3, 43, 29, 221, 189, 248, 32, 64, 109, 78, 32, 70, 214, 248, 4, 53, 5, 147, 255, 247, 40, 253, 106, 74, 5, 155, 1, 144, 0, 146, 205, 233, 2, 72]
2023-02-17 09:04:14,120 SLIP: --> [8, 104, 73, 79, 244, 27, 114, 4, 32, 12, 240, 88, 251, 59, 104, 19, 244, 128, 79, 180, 70, 3, 208, 217, 248, 0, 48, 3, 43, 13, 220, 98, 78, 105, 136, 1, 36, 8, 168, 180, 112, 30, 240, 62, 251, 0, 40, 127, 244, 28, 175, 176, 112, 255, 247, 28, 250, 26, 231, 107, 136, 91, 74, 2, 51]
2023-02-17 09:04:14,126 SLIP: --> [8, 20, 104, 128, 43, 13, 170, 40, 191, 128, 35, 8, 174, 0, 32, 23, 70, 22, 248, 1, 27, 79, 234, 17, 30, 1, 240, 15, 1, 20, 249, 14, 224, 130, 248, 0, 224, 1, 48, 97, 86, 81, 112, 131, 66, 2, 241, 2, 2, 238, 209, 0, 34, 7, 248, 19, 32, 77, 74, 220, 248, 4, 53, 1, 146]
2023-02-17 09:04:14,131 SLIP: --> [8, 76, 74, 0, 146, 71, 73, 2, 151, 64, 242, 109, 34, 4, 32, 12, 240, 21, 251, 196, 231, 144, 179, 1, 40, 127, 244, 223, 173, 223, 248, 28, 129, 216, 248, 0, 48, 91, 4, 36, 213, 223, 248, 20, 145, 217, 248, 0, 48, 3, 43, 30, 221, 14, 136, 57, 79, 48, 70, 215, 248, 4, 53, 5, 147]
2023-02-17 09:04:14,137 SLIP: --> [8, 255, 247, 192, 252, 170, 120, 5, 155, 1, 144, 205, 233, 2, 98, 58, 74, 0, 146, 52, 73, 64, 242, 147, 34, 4, 32, 12, 240, 239, 250, 216, 248, 0, 48, 19, 244, 128, 79, 188, 70, 3, 208, 217, 248, 0, 48, 3, 43, 36, 220, 41, 70, 55, 32, 255, 247, 235, 251, 185, 230, 47, 75, 27, 104]
2023-02-17 09:04:14,144 SLIP: --> [3]
Traceback (most recent call last):
  File "C:\Users\uPD008\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts\nrfutil-script.py", line 33, in <module>
    sys.exit(load_entry_point('nrfutil==6.1.3', 'console_scripts', 'nrfutil')())
  File "C:\Users\uPD008\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\click\core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\uPD008\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\click\core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "C:\Users\uPD008\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\click\core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\uPD008\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\click\core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\uPD008\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\click\core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\uPD008\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\click\core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\uPD008\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\nordicsemi\__main__.py", line 1063, in serial
    do_serial(package, port, connect_delay, flow_control, packet_receipt_notification, baud_rate, serial_number, True,
  File "C:\Users\uPD008\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\nordicsemi\__main__.py", line 980, in do_serial
    dfu.dfu_send_images()
  File "C:\Users\uPD008\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\nordicsemi\dfu\dfu.py", line 127, in dfu_send_images
    self._dfu_send_image(self.manifest.application)
  File "C:\Users\uPD008\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\nordicsemi\dfu\dfu.py", line 100, in _dfu_send_image
    self.dfu_transport.send_firmware(data)
  File "C:\Users\uPD008\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\nordicsemi\dfu\dfu_transport_serial.py", line 301, in send_firmware
    response['crc'] = self.__stream_data(data=data, crc=response['crc'], offset=i)
  File "C:\Users\uPD008\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\nordicsemi\dfu\dfu_transport_serial.py", line 474, in __stream_data
    response = self.__calculate_checksum()
  File "C:\Users\uPD008\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\nordicsemi\dfu\dfu_transport_serial.py", line 412, in __calculate_checksum
    raise NordicSemiException('Did not receive checksum response from DFU target. '
pc_ble_driver_py.exceptions.NordicSemiException: Did not receive checksum response from DFU target. If MSD is enabled on the target device, try to disable it ref. https://wiki.segger.com/index.php?title=J-Link-OB_SAM3U

7282.sdk_config.h

  • In addition I am experiencing serious problems debugging the bootloader. I can start the debug session (breakpoint at the beginning of main) and I set a bp in the function you pointed out, but when I let the bl run and I start the update process the debug session sistematically returns a series of errors in reading registers and I have to restart it. Is there some register that I can read, e.g. using nrfjpog, whose value can shed some light on why the interrupted update is not working?
    Thanks.

    Regards,

    Stefano

  • Hi Stefano, 

    To be able to debug the bootloader, you should use the debug version of the bootloader, not the project  without "debug". The one without "debug" is optimized and you can't step in the code. Make sure you erase the chip before flashing the debug version because it needs to re-write the UICR. 


    Please let me know which hardware board you are using for testing my firmware.

  • Hello Hung Bui,

    I am using our proprietary board mounting a Nrf52840, connected to a PC with a serial adapter (FTDI FT232RL chip). This is the same configuration under which the (uninterrupted) update works. I can try with your board and I am sure that the combination of the Nordic dev board and your fw will work, but I am not sure this can help much in solving the problem I see. 

  • Hi Stefano, 

    If your board uses different UART pins then of course the hex file I provided will not work. But I would strongly suggest to try testing on a DK to align what we have with the DK before testing with your board. 
    I did a quick test here without flow control and it also worked after the interruptions. 

  • Dear Hung Bui,

    Thank you for your answer and sorry for being late, I was away a few days.
    I performed the test you asked on the dev board and indeed when the nrfutil process is killed and subsequently restarted the update restarts where it was interrupted and is finalized.
    What I did subsequently was to compare my sdk_config.h with the one of the official signed serial bootloader (v. 16.0.0). I realigned the defines to the latter version as much as I could (you may remember that we also need the combined BLE bootloader, so all the related BLE defines must be there). After the realignment, an update through nrfutil with a serial adapter connected directly to our board works almost perfectly. That "almost" refer to the fact that, from time to time, I get what is shown in the picture: there I started the update through nrfutil, killed it (at 16%) and then restarted: the update continued where it was stopped. However, when I killed (at 52%) and restarted nrfutil again, it crashed because the continued update started where the first (at about 16%) and not the second (at 52%) nrfutil was stopped. If one looks at the logs, this corresponds to the firmware providing the first offset, as if the second one (i.e. the one corresponding to 52% advancement) was not written in flash when nrfutil was killed the second time.
    This looks actually the same way in which the update on our full board (i.e. the Nordic connected to another MCU) fails: when we kill the update and then restart it, the offset provided by the MCU is always 0 (i.e. the beginning of the flash space reserved to the firmware image), thus ignoring what was written up to then.
    Can you please tell me how/where this offset is written in flash and let me know if you have any idea on why sometimes it doesn't seem to be written (rarely with nrfutil, sistematically in our custom update) when we kill the update process?
    Many thanks.
    Regards,

    Stefano

Related