This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Stuck in an infinite loop when Keil-MDK debugging starts

Hi,

I try to validate my CMSIS pack and new flash programming algorithm(The function has been properly verified). So I create a new project with this CMSIS pack and load the application to Flash using the new flash programming algorithm.

(Memory: 8M Flash from 0x0000 0000 to 0x0080 0000. 2M RAM from 0x2000 0000.)

When I online debug in Keil-MDK after load application.axf to Flash.

Unfortunately, the application is stuck in an infinite loop after clicking Start Debug Session.

Weirdly, the address is the Start address of Ram for Algorithm 0x2008 0000.

Normally, SP and PC values should be reset to the correct value stored in 0x0000 0000 and 0x0000 0004 of my application as follow:

I guess there is something wrong in RESET Sequence and made some attempts.
1. Check "Reset and Run" in Debug Setting.

The application will run OK but cannot be online debugged normally, such as reset to stack point init or system init.

2. Add the initialization file and load SP/PC value from 0x0000 0000/0x0000 0004.

The same thing happened. The application will run OK but cannot be online debugged normally.

Please help me if you have any ideas!

Thanks a lot!