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