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

What conditions cause OP_CODE_SYS_RESET to get sent during DFU?

Hi, I'm testing doing a soft device update (v7.0 to v7.1) over DFU, but I consistently get OP_CODE_SYS_RESET sent to my device after 4 packets(80 bytes), at which point the update fails. I'm using an Android device using nRF Toolbox v1.4 to perform the update. I'm curious what would cause the android device to send that op code. thank you, akbar

  • Hi Akbar,

    Could you let me know which bootloader you are using (SDK version) ? Could you capture a sniffer trace of your DFU process ?

    Android app will send that reset command (0x06) if the DFU is not in correct state. I would need to have a look at the trace to know what would be wrong.

  • Hi Hung, I'm using an older sdk (SDK 6.0). I figured out why the error was happening (and have a work around but not sure if it's a reliable workaround) but I don't understand the base cause of it. Basically i was getting a NRF_ERROR_NO_MEM error from the "hci_mem_pool_rx_produce" function call found in "app_data_process/dfu_transport_ble.c". The reason this was happening is because the "pstorage_callback_handler/dfu_dual_bank.c" was never being called and so hci memory was not being released. What's interesting is that this scenario only occurred when updating the softdevice, when I attempted to update an application, everything functioned normally. My workaround was to comment out "dfu_sd_prepare" in "dfu_start_pkt_handle" as this was one of the main differences between updating a softdevice and an application. Once I commented that out I was able to update the softdevice on my device.

  • Hi Akbar,

    I assume that you are using the experimental bootloader included in the SDK v6.0. The official version in SDK v6.0 doesn't support Softdevice update. I would not suggest to use the experimental version on V6.0 but to switch to the offical bootloader version in SDK v6.1.

    Please try with SDK v6.1 and let me know the result.

  • Hi Hung, I mis-typed, I actually am using 6.1. Apologies. best, akbar

  • Hi Akbar,

    I don't have issue updating softdevice with nRFToolbox App (v1.11.4) and the DFU bootloader in SDK v6.1 If you have issue of NRF_ERROR_NO_MEM , could you please check and make sure the hci_mem_pool_internal.h is referred correctly, that RX_BUF_QUEUE_SIZE = 8, TX_BUF_SIZE = 4 and RX_BUF_SIZE = 32. Before we had an issue that the wrong file (the one for UART DFU) is referred instead that resulted in NRF_ERROR_NO_MEM error.

Related