Other Parts Discussed in Thread: CC2652R
I am developing a bootloader and now want to jump to the application. At first I did this with a very barebone application which was a simple loop inside of which an integer kept getting incremented. This worked.
I jump to the application and could see from the disassembly in code composer studio that it was indeed going through that loop.
Now the next step is jumping from the bootloader to a more sophisticated application. To test with I use the pwmled2 example for my board. However this time it fails and ends up in the faultISR.
I suspect this might be because the Board_init() function is both called inside of my bootloader and the pwmled2 example. I need this function in the bootloader to access the SPI, NVS and GPIO API and the pwmled2 example uses it to use the GPIO pins as well.
How do I go around this problem? If it even is the Board_init() function because I am not entirely sure what the problem is. Is it possible to save some form of signal somewhere so I can reset the board and then read that value before calling Board_init() in the bootloader so I can immediately jump to the application?
If I change the configuration settings in the .sycfg file of the bootloader so they look like the ones in the .syscfg of the application then everything works. So the problem must be that pins are configured one way through the Board_init() method in the bootloader and then the Board_init() of the application tries to configure them another way. Is there some sort of opposite of Board_init() available?
Thank you in advance.
I use Code Composer Studio 9.3, the CC2652R, and the SimpleLink CC13x2 26x2 SDK version 3.40.0.02.
This is the code I use to jump to the application:
void jumpToApp(uint32_t sp, uint32_t pc) {
asm(" LDR SP, [R0, #0x0]");
asm(" LDR PC, [R0, #4]");
}