This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2652: Bus Fault when jumping from bootloader to application

I have some trouble when jumping from my bootloader to an application on a CC2652. When I try to jump I end up in FaultISR from where I can see that the BFARVALID and PRECISERR bits are set in the CPU_SCS -> CFSR register. The value in BFAR is 0x00400000 but I can not see what is happening at this address in the disassembly view provided by Code Composer Studio. I do not know how to further debug this problem or how to continue. I created a github repository with a small version of my project: 

In this project I use UART and a python script to send a test project in Intel Hex format from the PC to the device.

I am trying to jump to the application using this piece of code:

__asm("  movw    r0, #0x0000");
__asm("  movt    r0, #0x0040");
__asm("  ldr     sp, [r0, #0]");
__asm("  ldr     pc, [r0, #4]");

  • Hi Vincent,

    Have you looked at the bootloader provided by TI (example named BIM in the SDK) and compared this with your version? Also, have you verified that the jump is done to the reset vector of the application and that the SP is set as expected? 

    Lastly, what happens if you single step over it all (disassembly style), where do the program go wrong?

  • Hi M-W,

    I now see that the error occurs as soon as I try to write to the SP with __asm("  ldr     sp, [r0, #0]");. I have tried the BIM example as well but then I receive a STKERR as well as a PRECISERR but with 0x00000328 in BFAR. Writing to SP does work with the BIM example though, it is the jumping to the application that goes wrong at that point. The SP is then set to 0x00000330 and I am not entirely sure if that is the correct value. This is my first time writing a bootloader.

  • Using the BIM's SP load statement, but my PC statement I believe it is working now. Thank you for your help M-W.