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

Application updated over the air doesn't start properly

Dear all,

I have nRF51 DK and I use mbed CLI to build my application that is simple mbed-os-example-blinky. Also I have SDK11.0.0 and I built the ble dfu bootloader (./examples/dfu/bootloader/pca10028/dual_bank_ble_s130/armgcc), merged that .hex file with softdevice s130 .hex file (./components/softdevice/s130/hex/s130_nrf51_2.0.0_softdevice.hex) and flashed the board via nRFStudio (Program Bootloader tab) with the result .hex file.

I built my application with command

$ mbed compile -m NRF51_DK_OTA -t GCC_ARM -c --profile release

I follow the tutorial to update the application over the air. After update I realized that my application did bot start. I look into mbed-os-example-blinky.hex file and found out that FLASH MEMORY region set at 0x0001C000 however it has to be set at 0x0001b000 for softdevice s130 v2.0.0. So I fixed file ./mbed-os/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/device/TOOLCHAIN_GCC_ARM/TARGET_MCU_NORDIC_32K/NRF51822.ld as following:

 MEMORY
 {
-  FLASH (rx) : ORIGIN = 0x0001C000, LENGTH = 0x24000
+  FLASH (rx) : ORIGIN = 0x0001b000, LENGTH = 0x24000
   RAM (rwx) :  ORIGIN = 0x20002800, LENGTH = 0x5800
 }

then rebuilt my application and updated over the air again. I noticed that LED blinked once at the beginning and that was all. I pressed reset button a few times and I saw how it blinked. I connected to the board via Ozone debugger and found out that my application started and after calling wait() function it didn't work anymore.

I built a few applications from SDK11, update them OTA and all of them work fine, as I undestood they don't use softdevice (BTW, is it true?).

I guess something is wrong with softdevice initialization in my application but I can't understand what exactly and how to fix it.

Any ideas? Because I ran out of them.

Parents
  • I'm not very familiar with mbed (you should post your question on mbed forum as well). But did the mbed firmware work if you flash it directly (softdevice + application, no bootloader) ? Strange to see that the start address is 0x1C000. On the ld file for S110 it was correct.

    It's normal to be in wait() most likely it put the CPU to sleep and if there isn't any event, the CPU will remain in sleep mode.

Reply
  • I'm not very familiar with mbed (you should post your question on mbed forum as well). But did the mbed firmware work if you flash it directly (softdevice + application, no bootloader) ? Strange to see that the start address is 0x1C000. On the ld file for S110 it was correct.

    It's normal to be in wait() most likely it put the CPU to sleep and if there isn't any event, the CPU will remain in sleep mode.

Children
No Data
Related