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.

TMS570LC4357: Proper c_int00 initialization with a separate bootloader and application

Part Number: TMS570LC4357


This is related to the thread: https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1035491/tms570lc4357-questions-about-the-tms570lc43-safetymcu_bootloaders-example-code/3830354#3830354

I got back to this bootloader, and I believe it is almost working -- except if there is a watchdog reset; the bootloader data-aborts after this reset. The example code calls getResetSource() and for a WATCHDOG_RESET, the switch statement just breaks. Why would these functions be skipped on a watchdog-reset (aren't all registers set to default after this reset)?

My solution was to change both the bootloader and application c_int00 to remove the switch and always follow the EXT_RESET path, which is the same as POWERON_RESET except the call to errata_SSWF021... So these 2 c_int00 calls call the same set of functions:

_memInit_();

_coreEnableEventBusExport_();

systemInit();

_coreEnableIrqVicOffset_();

vimInit();

esmInit();

This works, but do you see any problem with calling these functions twice every boot?

Thanks,

Jim