There is a requirement is that keep an IO high level when APP jump to the bootloader, so it is not feasibile to enter Bootloader by software reset.
It is normal for the first time to enter APP from Bootloader.I deinitialize all peripheral such as PIT, SPI before entering bootloader and bootloader will enter APP again. When MCU enter APP from bootloader for the second time, it will stuck at initialzing. I used the library functions offered by IDE. These pictures shows how I find the problem.
1.I find it stuck at here.
LuoSi_11-1715927008462.png
LuoSi_4-1715926233966.png
2.Then stuck at here in picture 1 function
LuoSi_5-1715926316880.png
3.Then stuck at here in picture 2 function
LuoSi_6-1715926356787.png
4.Then stuck at here in picture 3 function
LuoSi_7-1715926412080.png
5.And finally I found here. It seems that the cycle is waiting a register status until timeout.
LuoSi_8-1715926471975.png
6.Then I checked the address of this register, and found out what is the cycle wating for.
LuoSi_9-1715926764250.png
LuoSi_10-1715926813693.png
LuoSi_12-1715927014672.png
But I dont know why this bit stuck at "Mode transition is on going ". Besides, I tried to reduced the TIMEOUT value in picture 5, then the project will stuck at initializing PIT, or SPI, or the others peripheral.