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

Application does not start after DFU update

Hi, I've combined the secure serial and ble bootloader and using it for my custom board. I tried flashing my application hex over serial using nrfutil. I get a device programmed 100% message but my application is not starting. Is there a issue with my iram and irom settings? Following are my target settings for application and bootloader:

Application settings

IROM1

Start: 0x23000

Size: 0x5D000

IRAM1

Start: 0x20002A68

Size: 0x10000

Bootloader Settings

IROM1 Start:0x73000

Size: 0xB000

IRAM1 Start: 0x20002C00

Size:0xDE80

I'm using softdevice v5.0.0 and sdk14.0.0 for my application and bootloader.

Parents
  • I generate a dfu package using the nrfutil, I observe that the application starts but stops after few seconds.

  • So actually the application started? You need to debug the application and see where it crashes. Debug it as normal, just start debugging and then let the bootloader running you should get to application's main after the bootloader starts and switch to application. 

  • I observe that the bootloader works only when I've connected my board to the debugger, after the dfu update the application does not start, but when I go to nrf go studio and connect and disconnect my device the application starts!

  • Please try to test DFU with very simple application, such as blinking LED. This is to make sure if DFU works fine or not. Then you should find a way to debug your application without using the debugger, for example toggle LED and print on UART. I suspect something wrong with the fact that the bootloader may use some peripherals and if in the application those peripheral are not initialized properly it will cause issue. 

Reply
  • Please try to test DFU with very simple application, such as blinking LED. This is to make sure if DFU works fine or not. Then you should find a way to debug your application without using the debugger, for example toggle LED and print on UART. I suspect something wrong with the fact that the bootloader may use some peripherals and if in the application those peripheral are not initialized properly it will cause issue. 

Children
  • Hi, I tested the same bootloader with blinky example on the nrf52 DK it is working as expected. I also tested the bootloader with a simple application as suggested with just led display on my custom board. I face the same issue, Application does not start automatically, I need to connect my debbuger for it to start. Should I change the boot0 pin configuration after update?

  • I also observe that after flashing the bootloader, if I cycle the power, bootloader does not start. It only starts after i connect it with the debugger.

  • Please try to debug using LED toggle or UART/RTT to see where it stuck inside the bootloader. 

    Please test with unmodified BLE or UART bootloader. 


    Note that if you don't have 32kHz crystal on the custom board, you need to configure the bootloader/application firmware to use RC LFCLK instead. 

  • I have changed the clock configurations to :

    Clock Configuration

    Still facing the same issue..

    I also saw this thread, Should I  make any changes to clock init code?

  • I don't think there is extra step needed if you want to use the RC LF clock. Please try to add some code to toggle an LED and find where the code stopped. Or you can use the debug version of the bootloader and then enable logging.