Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

App gets stuck when booted from bootloader (works fine without bootloader) - SDK15 - 0xCAFEBABE in registers

Hello,

I'm having a weird issue that I'm not sure how to debug. I have an app that I know works fine if programmed just with the softdevice. However, when I also program the bootloader, the app gets stuck when initializing the softdevice. I can't see any error codes, I just see all the debug output that happens before ble_stack_init() and then nothing. The bootloader works fine as far as I'm concerned.

How can I go about this problem? Thanks for your help!

I'm using Eclipse + ARM GCC 7.2.1 , SDK15.0, S132 v6.0.0, NRF52832.

EDIT: Just to be clear, the bootloader does jump to the app normally. My app actually starts running and then it stops

Parents
  • I'm no longer sure about where the program is getting stuck, but I looked at the registers by halting the processor after it gets stuck and they read this:

    PC = 0007763E, CycleCnt = 3C7E5A37
    R0 = 00000064, R1 = 0007763F, R2 = CAFEBABE, R3 = CAFEBABE
    R4 = 00000204, R5 = 00000000, R6 = 20004158, R7 = 00000000
    R8 = 00000003, R9 = 00000003, R10= 0004314A, R11= 2000FF94
    R12= 00000000
    SP(R13)= 2000FF58, MSP= 2000FF58, PSP= 00000000, R14(LR) = FFFFFFF9
    XPSR = 21000019: APSR = nzCvq, EPSR = 01000000, IPSR = 019 (INTISR10)
    CFBP = 00000000, CONTROL = 00, FAULTMASK = 00, BASEPRI = 00, PRIMASK = 00

    How can I use that information to figure out what's going on?

  • How did you flash the DFU and your firmware ? It looks like DFU never jump to your firmware.  

    To debug your firmware with DFU, first upload your firmware using DFU.  Then you can refresh firmware for debugging with Eclipse.  Important that the binary of your firmware must be the same in both cases.  

Reply Children
Related