Tool/software: Code Composer Studio
Hi Zhaohong Zhang,
In the thread below,you advise a S/W system reset before booloader jump to app.
https://e2e.ti.com/support/microcontrollers/hercules/f/312/p/225447/994487#994487
I have tryed in my project and it works.
After the software reset ,in the beginning of the c_int00, in the USER CODE BEGIN (5), i use "if(systemREG1->SYSESR&0x10)" to jump to app.
But this doesn't work after power cycle, how to do it then?
I have tryed to write a flag in the start of sector 3 ,bank7(0xF020_C000) , before the S/W system reset.
In my proj. i used sector 0~2 as FEE, i write the flag just use the flash api,not fee drive.
I think if i read the flag befor i check SYSESR after power cycle, then i can jump to app. the code list:
void _c_int00(void)
{
/* USER CODE BEGIN (5) */
uint32 app_start_flag;
app_start_flag=(*(uint32 *)(0xF020C000));
However sometimes it works ,some times it caused a nerror and the red led lighted in the 570HDK.
and there some questions i need your help:
1、how to jump to app after power clcye?
2、how to jump to bootloader from app? a S/W system reset will cause a endless loop.
3、what caused the nerror?what's the diffrence between this kind of read a flash address and the Fapi? Or the init of the flash have to be done first?
Best regards,
guodong