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.

  • Describe all your steps in more detail.

  • Please see the comments in this thread.

    It sounds like you are using the 128 kB version of the nRF51822 and this does not support softdevice update and the bootloader project would have to be moved so that it fits within the memory space of the 128 kB. By default it is set up to run on the 256 kB version and hence will be written to memory outside what's available on your chip.

  • Have you looked at this single bank code? I think it would fit better to 128kB flash chip. However, it is ported to the SDK v5.2.0 and SD 6.0.0. The new S110 softdevice v7.0.0 is 88 kB , so there is only 40 kB available for bootloader, application and application data.

  • Hi Stefan,

    Thanks for your reply. It seems that the single bank code takes 13.29kb and the bootloader coming with the SDK 6.1.0 takes 14.42kb. It is an improvement although the code is ready to work with a 256kb chip. Could you send the single bank bootloader and the hrm application code ready to work with the 128kb version? That would be very helpful.

  • Hi Ignacio

    I have uploaded a new single-bank bootloader variant that should be compatible with the QFAB 128kB chip. The link to it is here. I have only tested it on QFAA 256kB hardware, so please test the bootloader on your QFAB chip and give your feedback to this thread. The bootloader is compressed as much as possible and it occupies 14kB on the chip, leaving 26kB free for the application.

    I have uploaded application code with nRFToolbox for Android. As the Readme on Github says, you can not currently use the DFU function in Master Control Panel on Win PC for the application upload.

    Update 16.10.2014 I have tested the bootloader to work on 128kB nRF51822-QFAB variant. I found out that 1 page of the application space is reserved for PStorage swap area and 1 page additionally is reserved by default for bonding information, so the application code maximum size is 24kB.

    Update 23.10.2014 The QFAB bootloader is tested with Android nRFToolbox v1.10.0 and IOS Toolbox v1.3. It does not work with Master Control Panel provided for Windows, at least not yet with the latest version 3.7.0.

Related