This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Mesh UART-DFU fail with "Abort event. Reason: 0x4"

Hi,

We base on the light switch example to include the dfu process into it.

Device FW information is as follows:

Mesh sdk: v4.2.0
SoftDevice: s113_nrf52_7.0.1_softdevice.hex
bootloader: mesh_bootloader_gccarmemb_nrf52832_xxAA.hex
device page: device_page_nrf52832_xxAA_s113_7.0.1.hex

Testing environment:
1. PC <-UART-> 52832 DK

Build a DFU-sender program with c code (just like the nrfutil works) in PC to send the bin and dat data to 52832DK.
The 52832DK with pre-compile bootloader,soft device, application FW and device page can be dfu updated successfully via UART.

 0> <t:    4266661>, serial_bearer.c,  394, frank: C8
 0> <t:    4266667>, serial_bearer.c,  394, frank: A
 0> <t:    4266673>, serial_bearer.c,  394, frank: 40
 0> <t:    4266680>, serial_bearer.c,  394, frank: D
 0> <t:    4266682>, serial_bearer.c,  212, ----frank---  end_reception
 0> <t:    4266684>, serial_bearer.c,  141, ----frank---  serial_process
 0> <t:    4266688>, nrf_mesh_dfu.c,  502, 	DFU segment rx: 9623/9623
 0> <t:    4266693>, nrf_mesh_dfu.c,  656, 	TIMER set: 30000000us delay (@1696209137)
 0> <t:    4266697>, nrf_mesh_dfu.c,  581, 	RADIO TX! SLOT 1, count 3, interval: exponential, handle: FFFC
 0> <t:    5249733>, nrf_mesh_dfu.c,  351, Timeout fired @1696209137
 0> <t:    5264814>, nrf_mesh_dfu.c,  367, Write complete (0x2000FD38)
 0> <t:    5264818>, nrf_mesh_dfu.c,  376, Flash idle.
 0> <t:    5264891>, nrf_mesh_dfu.c,  372, Erase complete (0x7E000)
 0> <t:    5264899>, nrf_mesh_dfu.c,  367, Write complete (0x7F000)
 0> <t:    5265033>, nrf_mesh_dfu.c,  367, Write complete (0x7F004)
 0> <t:    5265041>, nrf_mesh_dfu.c,  367, Write complete (0x7F048)
 0> <t:    5265044>, nrf_mesh_dfu.c,  367, Write complete (0x7F054)
 0> <t:    5265048>, nrf_mesh_dfu.c,  367, Write complete (0x7F060)
 0> <t:    5265051>, nrf_mesh_dfu.c,  367, Write complete (0x7F06C)
 0> <t:    5265054>, nrf_mesh_dfu.c,  367, Write complete (0x7F080)
 0> <t:    5265057>, nrf_mesh_dfu.c,  367, Write complete (0x7F088)
 0> <t:    5265060>, nrf_mesh_dfu.c,  367, Write complete (0x7F0E0)
 0> <t:    5265132>, nrf_mesh_dfu.c,  372, Erase complete (0x7F000)
 0> <t:    5265140>, nrf_mesh_dfu.c,  367, Write complete (0x7E000)
 0> <t:    5265275>, nrf_mesh_dfu.c,  367, Write complete (0x7E004)
 0> <t:    5265283>, nrf_mesh_dfu.c,  367, Write complete (0x7E048)
 0> <t:    5265286>, nrf_mesh_dfu.c,  367, Write complete (0x7E054)
 0> <t:    5265289>, nrf_mesh_dfu.c,  367, Write complete (0x7E060)
 0> <t:    5265292>, nrf_mesh_dfu.c,  367, Write complete (0x7E06C)
 0> <t:    5265295>, nrf_mesh_dfu.c,  367, Write complete (0x7E080)
 0> <t:    5265298>, nrf_mesh_dfu.c,  367, Write complete (0x7E088)
 0> <t:    5265301>, nrf_mesh_dfu.c,  367, Write complete (0x7E0E0)
 0> <t:    5265304>, nrf_mesh_dfu.c,  376, Flash idle.
 0> <t:    5265306>, nrf_mesh_dfu.c,  520, 	DFU END!
 0> <t:    5265310>, dfu_init.c,  152, ----- NRF_MESH_EVT_DFU_END...
 0> <t:    5265314>, nrf_mesh_dfu.c,  527, 	DFU BANK AVAILABLE
 0> <t:    5265317>, dfu_init.c,  159, ----- NRF_MESH_EVT_DFU_BANK_AVAILABLE...
 0> <t:    5265374>, nrf_mesh_dfu.c,  367, Write complete (0x2000FD38)
 0> <t:    5265378>, nrf_mesh_dfu.c,  376, Flash idle.

2.other MCU <-UART-> 52832 module

Build a DFU-sender program with c code (just like the nrfutil works) in "other MCU" to send the bin and dat data to 52832 module.
The 52832 module with the same FW as above (pre-compile bootloader,soft device, application FW and device page) can get the bin+data data successfully with no errors (correct event,op-code and status) from "other MCU" via UART. But it shows "the Abort event. Reason: 0x4".

 0> <t:    3850853>, serial_bearer.c,  388, frank: A3
 0> <t:    3850859>, serial_bearer.c,  388, frank: 7E
 0> <t:    3850862>, nrf_mesh_dfu.c,  502, 	DFU segment rx: 9622/9623
 0> <t:    3850867>, nrf_mesh_dfu.c,  581, 	RADIO TX! SLOT 1, count 3, interval: exponential, handle: FFFC
 0> <t:    3854159>, serial_bearer.c,  388, frank: 19
 0> <t:    3854164>, serial_bearer.c,  388, frank: 78
 0> <t:    3854170>, serial_bearer.c,  388, frank: FC
 0> <t:    3854176>, serial_bearer.c,  388, frank: FF
 0> <t:    3854181>, serial_bearer.c,  388, frank: 97
 0> <t:    3854187>, serial_bearer.c,  388, frank: 25
 0> <t:    3854193>, serial_bearer.c,  388, frank: 1
 0> <t:    3854198>, serial_bearer.c,  388, frank: 0
 0> <t:    3854204>, serial_bearer.c,  388, frank: 0
 0> <t:    3854210>, serial_bearer.c,  388, frank: 0
 0> <t:    3854216>, serial_bearer.c,  388, frank: 5A
 0> <t:    3854221>, serial_bearer.c,  388, frank: 14
 0> <t:    3854227>, serial_bearer.c,  388, frank: 81
 0> <t:    3854233>, serial_bearer.c,  388, frank: BD
 0> <t:    3854238>, serial_bearer.c,  388, frank: 15
 0> <t:    3854244>, serial_bearer.c,  388, frank: 8D
 0> <t:    3854250>, serial_bearer.c,  388, frank: 59
 0> <t:    3854256>, serial_bearer.c,  388, frank: 8D
 0> <t:    3854262>, serial_bearer.c,  388, frank: D2
 0> <t:    3854267>, serial_bearer.c,  388, frank: D1
 0> <t:    3854273>, serial_bearer.c,  388, frank: A4
 0> <t:    3854279>, serial_bearer.c,  388, frank: 6F
 0> <t:    3854284>, serial_bearer.c,  388, frank: C8
 0> <t:    3854290>, serial_bearer.c,  388, frank: A
 0> <t:    3854296>, serial_bearer.c,  388, frank: 40
 0> <t:    3854301>, serial_bearer.c,  388, frank: D
 0> <t:    3854305>, nrf_mesh_dfu.c,  502, 	DFU segment rx: 9623/9623
 0> <t:    3854310>, nrf_mesh_dfu.c,  656, 	TIMER set: 30000000us delay (@1171624207)
 0> <t:    3854314>, nrf_mesh_dfu.c,  581, 	RADIO TX! SLOT 1, count 3, interval: exponential, handle: FFFC
 0> <t:    4837350>, nrf_mesh_dfu.c,  351, Timeout fired @1171624207
 0> <t:    4852242>, nrf_mesh_dfu.c,  431, 	Abort event. Reason: 0x4
 0> <t:    4852246>, dfu_init.c,  151, ----- NRF_MESH_EVT_DFU_END...
 0> <t:    4852250>, nrf_mesh_dfu.c,  581, 	RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFE
 0> <t:    6047382>, serial_bearer.c,  388, frank: 55
 0> <t:    6047387>, serial_bearer.c,  388, frank: 7
 0> <t:    6047393>, serial_bearer.c,  388, frank: 32
 0> <t:    6047399>, serial_bearer.c,  388, frank: 1
 0> <t:    6047404>, serial_bearer.c,  388, frank: 0
 0> <t:    6047410>, serial_bearer.c,  388, frank: C7

Could anyone help it?

Thanks,
Frank

  • Hi Hung,
    We take reference from your 52840 ses project to create our 52832 project by using sd-s113  under the \mesh\bootloader folder. (mesh_bootloader_gccarmemb_nrf52832_xxAA.emProject).

    bootloader_test.rar

    We erase chip then run the debug mode but an error occurs as the picture shows.


    Is there anything that needs to be modified ?


    Thanks,
    Frank

  • Hi Frank,

    Please make sure you have flashed the device page. Without that the bootloader won't work. 
    Also I noticed that you located the bootloader at address 0x1c000. This may not correct.

    Usually we locate the bootloader on top of the flash space. 

    In our bootloader linker .ld (in linker folder) you can find the location of the bootloader should be 0x78000.

  • Hi Hung,

    We did several tests in these days and found out if we slow down the sender's speed, the successful rate for uart-dfu updated will be improved.

    If we speed up the sender's speed, the device will get wrong uart-dfu data (bin data) more easily.
    And it will let the dfu fail with "Abort Reason 0x4".


    Besides to slow down the sender's speed, is there anything the device can be modified to decrease the uart-dfu updated time?


    Thanks,
    Frank

  • Hi Frank, 

    What's the transfer rate you are doing ? 
    Please follow the delay we have in nrfutil, pushing the speed of doing DFU may risk that the DFU packet haven't reached all nodes in the network before you push the new message. 
    Do you have HWFC enable ? 

  • Hi Hung,


    1.The sender sends each sets of bin data (26 bytes) and delay about 350ms then wait for the response from device.
    If the delay time is too short, it can let the dfu fail.
    The FW size is about 153KB and it will take about 30-40 minutes to complete the dfu updated.


    2.Due to we use the CTS & RTS pin to other purpose in "other MCU", the device doesn't enable the HWFC.

    3.If we just want to do one-one uart-dfu updated and don't want to use the air mesh dfu to other nodes or device, how can we do it?

    We use Buad Rate 57600.

    Thanks,
    Frank

Related