2022-01-06 02:24 PM
Hi,
Device - STM32H7B3I-DK
Project - STM32H7B3I-DK\Applications\2_Images_ExtFlash
HardFault when transfer control from BL to APP
1) Last trace of code
launch_application:
/******************************************************
* return from exception to application launch function
* R0: application vector address
* R1: exit function address
* push interrupt context R0 R1 R2 R3 R12 LR PC xPSR
*******************************************************/
MOV R2, #0x01000000 /* xPSR activate Thumb bit */
PUSH {R2}
MOV R2, #1
BIC R1, R1, R2 /* clear least significant bit of exit function */
PUSH {R1} /* return address = application entry point */
MOV R1, #0 /* clear other context registers */
PUSH {R1}
PUSH {R1}
PUSH {R1}
PUSH {R1}
PUSH {R1}
PUSH {R0} /* R0 = application entry point */
MOV LR, #0xFFFFFFF9 /* set LR to return to thread mode with main stack */
BX LR /* return from interrupt */
.end
Value of LR,SP
Memory of stack pointer :
2) LR : 0xFFFF.FFF9 return from Handler mode so NVIC does unstacks PC, R0-R3, R12, LR, xPSR
PC : 0x8020400 looks correct for APP launch
3) Application memory at 0x8020400
Which also looks about right.
Any help debugging this HardFault would be appreciated.
Thanks in Advance.
Solved! Go to Solution.
2022-01-06 05:32 PM
My bad the bootloader is actually making a jump to the application. UART configuration of application(Sample application) is corrupted somehow when it transfers control and its not printing the data.
Closing the ticket
2022-01-06 05:32 PM
My bad the bootloader is actually making a jump to the application. UART configuration of application(Sample application) is corrupted somehow when it transfers control and its not printing the data.
Closing the ticket