cancel
Showing results for 
Search instead for 
Did you mean: 

[STM32U5G9NJH6Q] Custom Boot / App SW [vmov s15, r3]

Strawberryrabbit
Associate

Hi, I'm creating Boot sw & App sw in one board. which means, 2 independent STM32 Proj. runs in same Flash / RAM.

 

There is an issue when HAL_RCC_GetSysClockFreq() has been called. The first called sw, boot sw, doesn't make any trouble. but the second one, app sw which is jumped in by boot sw, make trouble when do [vmov s15, r3] assembly code. I've already checked Memory Map, Flash.ld, Vector ... etc. So obviously, there is no problem until [vmov s15, r3] will be done by app sw.

 

the first call of [vmov s15, r3] is triggered by [main()] - [SystemClock_Config()] - [HAL_RCC_GetSysClockFreq()]
fracn1 = (float_t)(uint32_t)(pllfracen * ((RCC->PLL1FRACR & RCC_PLL1FRACR_PLL1FRACN) >> \ RCC_PLL1FRACR_PLL1FRACN_Pos));

Strawberryrabbit_0-1741684796785.png

 

As result of [vmov s15, r3], MSP has been corrupted. Red box is the Stack Pointer, and Blue box is MSP. So blue box area should not be changed by [vmov s15, r3]. But as you can see, the Return Address has been corrupted after [vmov s15, r3] has been runned.

Strawberryrabbit_1-1741684892007.png

Strawberryrabbit_2-1741684980038.png


Any Possible Suggestion will be welcomed. Thank you.

 

0 REPLIES 0