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

Bootloader starting never ends

image description

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

Parents
  • Hi Inspectron,

    It's normal to have the device disconnected because it's switched to bootloader mode after you write 0x01 to the DFU control point. After that you supposed to reconnect to the DFU bootloader and do the firmware update.

    If you use Master Control Panel (or nRFToolbox), when you connect to your application you don't have to write the DFU control point manually, the app will do that for you. You just have to select the firmware you want to update and the app will write 0x01 to control point then wait for the bootloader to start, then connect to bootloader and update the firmware.

    I just tested with the bootloader and the ble_app_hrs_dfu app from SDK v6.1 and it worked fine.

Reply
  • Hi Inspectron,

    It's normal to have the device disconnected because it's switched to bootloader mode after you write 0x01 to the DFU control point. After that you supposed to reconnect to the DFU bootloader and do the firmware update.

    If you use Master Control Panel (or nRFToolbox), when you connect to your application you don't have to write the DFU control point manually, the app will do that for you. You just have to select the firmware you want to update and the app will write 0x01 to control point then wait for the bootloader to start, then connect to bootloader and update the firmware.

    I just tested with the bootloader and the ble_app_hrs_dfu app from SDK v6.1 and it worked fine.

Children
Related