This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problems with OTA DFU in a 128kb chip

Hi

My aim is to be able to update the application code OTA in a 128kb chip (version nRF51822 QFABB0). First, I want to use the nordic original code to discard any other issue (SDK 6.1.0.0). I am going to explain in step by step guide what I've been trying so far. All questions/suggestions are most welcome.

.1 I use the nRFgo Studio (v 1.17.0) to erase the micro and flash the softdevice version s110_nrf51822_7.0.0_softdevice.hex.

.2 I open the nrf6310\device_firmware_updates\bootloader\arm\bootloader.uvproj with Keil (v 5.10) and change the following lines in the code:

 #define BOOTLOADER_REGION_START 0x0001C000
 #define BOOTLOADER_SETTINGS_ADDRESS 0x0001FC00

I also change the target parameters as in the following pic

Bootloader config

Compile and flash the bootloader through Keil.

.3 Then I open the ble_app_hrs_dfu project. There I also modify the target parameters as in the following image:

ble_app_hrs_dfu project config

Also compile and flash the application code through Keil.

.4 I use the MCP (v 3.6.0) to scan and I can see the device advertising as 'DfuTarg'. This is my problem because I am expecting the device to advertise as 'Nordic_HRM' according to the documentacion:

If there is no existing application in the nRF device, the device will be started in the bootloader mode. In case the device has an existing application, it will need to be put explicitly in the bootloader mode using button 7.

.5 I have done a DFU successfully with the app code 'ble_app_hrs_dfu' but the device still advertises as 'DfuTarg'

This is a sumary of my configuration.

SDK 6.1.0.0 using ble_app_hrs_dfu project without any change. s110_nrf51822_7.0.0_softdevice.hex nRFgoStudio 1.17.0 MCP 3.6.0 Keil 5.10.0

Thanks for your help.

  • Thanks for your help Stefan. I have modified the size in the bootloader project to 0x3800(14kb) instead of 0x6000.

    I have flashed the s110_nrf51822_7.0.0_softdevice.hex and also the bootloader from the last project you sent. I have manage to upload the application code ble_app_hrs_dfu.hex through the nrFToolbox for Android and then it works. The device starts advertising as the app code 'Nordic_HRM'. That's good progress, although I have tried to carry out another OTA DFU after the first one and the nRFToolbox prompted a 'GATT 133' error. After trying the second OTA DFU, the device does not advertise neither as a 'DfuTarg' nor as a 'Nordic_HRM'. If I power cycle the board it starts advertising again as 'Nordic_HRM' and trying another OTA DFU will prompt the same error.

    Although I know the single-bank bootloader wont work with the DFU MCP. I wanted to see the DFU steps and I can see the error comes after sending the 0x01 command to the DFU control point. It seems that the bootloader cannot handle a DFU reset.

    Could you test this on your side? Thanks

  • I haven't been able to get this to work on the QFAB--when I try to install it, either with nrfjprog or the MCP, I am told:

    ERROR: Hex file(s) contain addresses outside the code, RAM and UICR areas.

  • @Michael, I would ask yo to open a new case here on DevZone with your setup and questions. Include chip revisions, SDK versions , which softdevice and other tools you're using. We try to keep the forum to one poster and avoid multiple questionnaires in one case.

Related