Issue with Bootloader on STM32H743 using Boot0 and inline application to invoke ST Bootloader code
I am porting code from STM32L4R5 (STM32L4R5VIT6) to STM32H743 (STM32H743VIT6). All the porting has gone well except for the last part being Bootloader. We use Boot0 pin Grounded and request to go to bootloader within the application. I should also mention that we are using SPI (SPI4 in case of STM32H743, and SPI2 in case of STM32L4R5) for bootloader communication with the primary micro.
Details: In our system, the primary micro is iMX7 and the secondary micro is the STM32. They communicate via SPI. On the "main" loop of STM32, among its many tasks, it continuously monitors for request to go into bootloader. Once, it detects the bootloader request, it calls the Bootloader routine (attached below for both STM32L4R5 and STM32H743). In the meantime, the iMX7 is listening for the STM32 to go into bootloader. Once it detects STM32 is in bootloader, it sends the new firmware to it.
In our previous design that uses STM32L, Bootloader works just fine. However, in our latest design using the STM32H, it is not working! It basically acts as if it is going to bootload (jumps to supposedly ST bootloader routine that I don't have code to trace) and hangs in there. Meanwhile, the iMX7 not detecting the STM32H7 is in bootload, it times out and the process stops.
Note that we are using Boot0 Grounded and I know the Bootload address for STM32H7 has changed to 0x1FF09800 (see attached code). Nevertheless, the process is not
successful. Also please note that the ST-Link in my debug under JTAG reports Bootloader version as 0x9.0.
BTW, I have looked on the ST Community and other resources. Apparently, ST has written a whole new bootloader for the STM32H7. Many seem to be complaining about the
Bootloader of STM32H7. The attached bootloader code used for the STM32H7 is referenced from ST Community Knowledge Base under the title "Jump to Bootloader from application on STM32H7 devices".
Any help with this is greatly appreciated as it is stopping us from moving forward with the design. Thank you in advance.
NOTE: Added my Flash registers from Debugger upon the breakpoint at main startup point.
