TMS320F280037C: C2000 CAN bootloader issue

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.

  • Hello,

    TI generally recommends branching to the codestart of the application (at 0x88000 in your case). What is being done in the _c_int() functions? 

    Best,
    Matt

  • Hello Matt,

    Thanks a lot for the quick response.

    codestart in application is indeed done to 0x88000 in the files send to you.  _c_int() function is configured in the linker to FLASH_APP_STARTUP which is 0x88002 after BEGIN.

    We are not quite familiar with linker configurations and currently am trying to learn. It would be helpful if you can review the attached files in original question and confirm if the configurations done are correct.

  • Hi,

    Please branch to the codestart location. The code branches to _c_int00, the C environment setup routine from the compiler runtime support library, which initializes variables and calls main().

    I'll also note there is RAMLS0 overlap between the bootloader and application. Please keep this in mind if you try to branch back from the application to the bootloader, there may be issues if RAM isn't initialized properly between context switches.

    Best,
    Matt