Are there any display components on your board? If yes, suggest to use some of these display components as indicators, to help judge where system was stopped/corrupted. And then find solution.
Another suggestion is, at the start of main(), add some code to detect if any unexpected system reset happened .
Thanks for your response.
I found the root cause of this issue.