hellow,I encountered a rather tricky problem. I am using BootLoader+APP mode on S32K314. The same code works fine when the BootLoader jumps to the APP, but it triggers a hard fault when the app jumps back to the BootLoader. During debugging, I found that there was an error in setting up the stack. I can't think of a good solution for this issue and would like to ask if anyone has any suggestions?
The code and the values of the variables look like this:
Solved! Go to Solution.
hello ,can you teach me how to address this question?Thank you?Why not jump?
Note to check if the RTOS is used. If RTOS is used, pay attention to the usage of the MSP and PSP registers before jumping. If the boot loader does not apply RTOS, you need to change your stack usage to the MSP register. Similarly, if the RTOS is used in the APP or BOOT, you need to change your main stack to the PSP before jumping.
已解决
Note to check if the RTOS is used. If RTOS is used, pay attention to the usage of the MSP and PSP registers before jumping. If the boot loader does not apply RTOS, you need to change your stack usage to the MSP register. Similarly, if the RTOS is used in the APP or BOOT, you need to change your main stack to the PSP before jumping.