Part Number: TMS320F280037C
Other Parts Discussed in Thread: LAUNCHXL-F280039C, TMS320F2800137
Background: Currently we are working on a TI CAN bootloader implementation on C2000 platform. This will be used in TMS320F2800137 and TMS320F280037C. Testing is being done on LAUNCHXL-F280039C and using CCS 12.8.0.000012. We have ensured data transfer in flash against hex data using UCFlash and CCS memory browser tool. CRC verification is also done to verify data transfer.
Issue Description : Currently the issue we are facing is that bootloader is not jumping to the Application code. For troubleshooting, we have kept 2 LEDs; one in bootloader and another in application to check the status.
This is my bootloader section which handles application startup.
void CpuStartUserProgram(void)
{
void (*pProgResetHandler)(void);
if (FlashVerifyChecksum() == BLT_FALSE)
{
ti_setgpio_high();
delay_ms(100);
ti_setgpio_low();
delay_ms(100);
return;
}
DINT;
IER = 0x0000;
IFR = 0x0000;
ti_timer_reset();
EALLOW;
// CRITICAL: reset stack pointer
__asm(" MOV SP, #0x400");
// CRITICAL: clear status bits
__asm(" CLRC INTM");
__asm(" RPT #7 || NOP");
__asm(" CLRC DBGM");
EDIS;
//pProgResetHandler = (void (*)(void))CPU_USER_PROGRAM_STARTADDR_PTR;
ti_setgpio_high();
//__asm(" LB 0x0008E20A");
//pProgResetHandler();
__asm(" RPT #7 || NOP");
asm(" MOVL XAR7, ACC ");
asm(" LB *XAR7 ");
delay_ms(100);
ti_setgpio_low()
}
//--End of code---
To confirm the program is jumping to application, I am blinking an LED in the Launchpad(137) development board in the application section. However, LED is not blinking and is continuously OFF.
Another observation is Program counter is stuck on address of MAIN function. It is observed by debugging via CCS.
Additional information:
Configured two _c_int() functions in application and tried to call both addresses in my CPU_USER_PROGRAM_STARTADDR_PTR. However still did'nt application was not initializing.
PC 0x08E235 Program Counter [Core] ->Application Side (individual test)
PC 0x08490D Program Counter [Core] -> Bootloader Side (Individual test)
Individual test means only boot or app is tested by flashing via JTAG
I will attach my linker and map file as well for better understanding.
Files_map_and_linker.zip
Please let me know if you need any other clarification.