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

nRF51822-QFAA SDK12.3 system resets while uploading firmware in DFU

Hello Nordic team,

I already managed to get into DFU bootloader using buttonless DFU service, and successfully triggered application uploading process, but the system randomly resets at around 17% first time or some other progress such as 35% while re-uploading. Everytime it resets, the device restarts running old application and I have to do the buttonless DFU repeatedly until the uploading process finishes. I have tried to debug DFU bootloader, but I can't get the nrf_log outputs on UART, the application and other parts work well excepts the DFU, please help!

This happens almost every time on my Xperia X running android 8.0.0, while on another Oneplus One A0001 running android 8.1, it happens at about 1/3 probability, which means it can be done in one go sometimes.

SoC is nRF51822-QFAA, software developed on SDK12.3 on custom board, DFU function developed on Android-DFU-Library 1.7.

Flash layout:

Type Start Length
Softdevice 0 1B000
Application 1B000 1EC00
Bootloader 3AC00 5000

RAM layout:

Softdevice 20000000 1FF8
Application 20001FF8 2008
Bootloader 200025E0 1A20

Update: After many tests, I found the order of success:

1. Flash softdevice.hex and bootloader.hex by the debugger.

2. Reboot into bootloader(DFU) directly.

3. Update application.zip. and it can be done smoothly.

and the order of failure:

1. Flash softdevice.hex, application.hex, bootloader.hex and bootloader_settings.hex all by the debugger.

2. Reboot into application directly.

3. Use BLE buttonless DFU service to reboot into bootloader(DFU).

4. Update new application.zip, the process can start successfully but the device will reset somewhere while uploading.

As the main difference between the pure bootloader and the buttonless DFU triggered bootloader is the modification of bootloader settings, it seems like the buttonless DFU service has written something's wrong to the bootloader settings.

Related