Tool/software:
Hello I am developing a bootloader project for 28388D. Operation is like this CPU1 is the master, it boots CPU2 and CM. CPU1 receives data packages from communication bus and sends to CPU2/CM via IPC Interrupt. CM write binary to its own flash. When update sequence is finished CM and CPU1 handshakes and CM tries to branch to new application code start.
CM bootloader app resides on CMBANK Sector 0. It is booted by CPU1 by boot Device_bootCM(BOOTMODE_BOOT_TO_FLASH_SECTOR0). After it runs and gets binary it updates the flash section of CMBANK Sector 4.( I have checked by memory save function in ccs debug , binary of amy application and bootloader updated one are identical. I also checked ECC is correct and no error is raised ). After update is completed CM tries to jumpt to start of new application with following code but goes into fault.
#pragma CODE_SECTION(jump_to_app, ".TI.ramfunc")
typedef void (*AppEntryFunc_t)(void);
static inline void jump_to_app(void)
{
__disable_irq();
1) Re-point vector table to the app’s table
SCB_VTOR = 0x00210000;
uint32_t appStack = *((volatile uint32_t *)(0x00210000+ 0U));
uint32_t appEntry = *((volatile uint32_t *)(0x00210000+ 4U)); // e.g. 0x00210BB1
__set_MSP(appStack);
AppEntryFunc_t appStart = (AppEntryFunc_t)(appEntry );
appStart();
}
According to our friend chatgpt this layout is correct :
Vector table at 0x00210000 VTOR set to 0x00210000
.text
lives after 0x00210800
Reset handler at 0x00210C60 and entry _c_int00_noinit_noargs
at 0x00210BB1 (Thumb bit = 1)
What can be the reason for this problem and how can I solve it ?
I think there is a lack of example, documentation on this transition in TI resources..
Regards,