I'm studying to perform DFU Peripheral from Central both using nRF52840, I'm able to issue command to let Peripheral into DFU mode, but got a "Received a fault" message in RTT log when start sending "0x08" data, below is the log:
00> <debug> nrf_dfu_req_handler: Received Comand : 0x0600> <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_SELECT (command)00> <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x100> <debug> app: timer_stop (0x200057C8)00> <debug> app: timer_fire (0x200057C8)00> <debug> app: timer_activate (0x200057C8)00> <info> nrf_bootloader_wdt: Internal feed00> <debug> app: Shutting down transports (found: 1)00> <debug> nrf_dfu_req_handler: Received Comand : 0x0100> <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_CREATE (command)00> <debug> app: timer_stop (0x200057B8)00> <debug> app: timer_activate (0x200057B8)00> <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x100> <debug> app: timer_stop (0x200057C8)00> <debug> app: timer_fire (0x200057C8)00> <debug> app: timer_activate (0x200057C8)00> <info> nrf_bootloader_wdt: Internal feed00> <debug> nrf_dfu_req_handler: Received Comand : 0x0800> <error> app: Received a fault! id: 0x00004002, pc: 0x00000000, info: 0x2000B830
After that I compared the RTT log which issue the DFU command from mobile phone, the different is mobile phone acquires a buffer before sending "0x08" data, below is the RTT log to issue DFU from mobile phone
00> <debug> nrf_dfu_req_handler: Received Comand : 0x0100> <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_CREATE (command)00> <debug> app: timer_stop (0x200057B8)00> <debug> app: timer_activate (0x200057B8)00> <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x100> <debug> nrf_dfu_ble: Buffer 0x20006D04 acquired, len 141 (244)00> <debug> nrf_dfu_req_handler: Received Comand : 0x0800> <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (command)00> <debug> nrf_dfu_ble: Freeing buffer 0x20006D0400> <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
So, how can Central to acquire a specific buffer size before sending "0x08" data to Peripheral?
Thanks,
Kevin