Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN
Tool/software: Code Composer Studio
Hi,
When I using safety lib to finish diagnosis, the TMS570LC4357 reboot form APP to BOOT two times after power up, which takes my initial time。
It goes just as :power up->boot->app->boot->app->boot->app->application
I debug in CCS, and I found every time DSP jump to boot after finish SL_Init_R5Registers function, When I use demo project generated by halcogen , there is no reboot, so I compare the difference between demo project and safety lib resource.
The compare result as follow, demo project use _coreInitRegisters_ function to initiate cpu in hl_startup.c while safety lib resource using SL_Init_R5Registers function.
It seems there is a bug in front and end of SL_Init_R5Registers, it makes lr register initiate to 0 afterfinish SL_Init_R5Registers function, so the ARM kernel reboot from BOOT _c_int00.
So I changed the code MOV R0, LR in front of SL_Init_R5Registers function and BX R0 in end of SL_Init_R5Registers function,and it works good and there is no reboot to BOOT.
The question is : Is this a bug? and am I take the right measure to avoid this problem?
thank you.

