Bootlader running on STM32WL55 fails to jump to to application when HDP is enabled
Hello,
I am developing a project that includes a bootloader and an application to jump to.
Both binaries execute on the M0+ core in order to take advantage of the security features offered only for this core.
The idea is as follows:
The bootloader verifies the integrity/authenticity of the application and then jumps in it.
I am trying though to enable the hide protection (HDP) feature to allow the execution of the bootloader after a reset or power cycle and then protect the flash area where it is located.
In other words, I need the bootloader to be in a secure area and protected from potential read or write actions.
Based on the RF0453 I must call the RSSLIB_PFUNC->CloseExitHDP funtion from my bootloader to close the HDP area and then jump to my application.
Without enabling the HDP I can verify that the bootloader jumps to my application by using the RSSLIB function above.
When I enable the HDP, though, it seems as if the RSSLIB_PFUNC->CloseExitHDP funtion never jumps to my application.
The bootloader is located in flash offset 0x08020000.
My application is located in flash offset 0x08001800.
So, based on that I enable the HDP as follows:
- Set the SFSA value to 0x40
- Uncheck the FSD
- Set the HDPSA to 0x40
- Uncheck the HDPAD
To jump to my application I call the following line in my bootloader:
RSSLIB_PFUNC->CloseExitHDP(RSSLIB_HDP_AREA1, 0x08001800);I keep trying to read any related documentation such the the reference manual but it seems as if I miss somthing.
Please, let me know if you need further information to make things more clear!
Thank you!
