Tool/software:
Hi Expert
Customer reports an issue of SysCtl_delay(), in the below operation:
S/W structure: 0x80000 to 0x82000 is customer boot, 0x82000 and behind is APP.
Program routine:
- CAN communication triggers the customer boot program update branch;
- Boot loader erase the APP sectors flash and program the update APP firmware;
- Trigger the SysCtl_resetDevice(); once APP firmware is updated, then go to customer boot main function to re-init CPU.
This routine can run properly once the device powered up and resume with emulator, but once SysCtl_resetDevice(); triggered after the firmware update, and restart from main function entrance, the program will stuck in Device_init->SysCtl_setClock->SysCtl_delay (SysCtl.c file line 300). the program will go to ESTOP and cannot be restarted again with emulator.
I do the below check with customer:
- Confirmed the customer boot erased the right flash: after 0x82000.
- Confirmed _FLASH is added in the predefined symbol to ensure SysCtl_delay() run in RAM, the address is 0x0000866E.
- Once the APP firmware is updated by customer boot and power cycle the board, MCU will also stuck in the same instruction.
Seems the function is placed right, do you have any other suggestions on this debug?
Thanks
Joe