When I try to update the application on the nRF51422 chip over DFU, I have trouble with the bootloader.
I use the nRF Toolbox app to do the firmware update. I can select the nRF51422 Device and my File which I want to load on the Chip.
When I click on the Update button it connects with the nRF51422 but it never ends to start the bootloader.
Here are the changes in my project for the DFU service:
I added these 3 files to my project:
-bootloader_util_arm.c
-dfu_app_handler.c
-ble_dfu.c
#include "ble_dfu.h"
#include "dfu_app_handler.h"
#define DFU_REV_MAJOR 0x00
#define DFU_REV_MINOR 0x01
#define DFU_REVISION ((DFU_REV_MAJOR << 8) | DFU_REV_MINOR)
static ble_dfu_t m_dfus;
static void services_init(void)
{
ble_dfu_init_t dfus_init;
memset(&dfus_init, 0, sizeof(dfus_init));
dfus_init.evt_handler = dfu_app_on_dfu_evt;
dfus_init.error_handler = NULL;
dfus_init.evt_handler = dfu_app_on_dfu_evt;
dfus_init.revision = DFU_REVISION;
err_code = ble_dfu_init(&m_dfus, &dfus_init);
APP_ERROR_CHECK(err_code);
dfu_app_reset_prepare_set(reset_prepare);
}
static void ble_evt_dispatch(ble_evt_t * p_ble_evt)
{
ble_dfu_on_ble_evt(&m_dfus, p_ble_evt);
}
What is missing? Or what is the reason for the problem to start the bootloader?
EDIT: I`m working with SDK 6.1 and nRF Toolbox 1.11.4
Log in Master Control Panel:
-Writing to Characteristic 1531
-gatt.writeCharacteristic(1531)
-Enabling notification for 1531
-gatt.writeDescriptor value = 0x01-00
-Error (0x85): GATT ERROR
-[CALLBACK] connection state chenged with status: 0 and new state: 0(DISCONNECT)
-Disconnected
I didnt change anything on the bootloader.hex file