Hi.
I'm using SES in 3.22 Version, simulated cpu is STM32F427ZG - Cortex M4F.
What happen:
cpu is in Handler mode - SYSTICK occured and is handled.
Register values:
ICSR = 0x0000000F
PSP = 0x20000328
MSP = 0x2002FBFC
CONTROL[1] =SP_main
*0x2002FBFC = 0xFFFFFFFD
next instruction is : pop.w {pc}
This is return to thread mode so I expect that after execute this instruction registers value should be:
ICSR = 0x00000000
PSP = 0x20000328
MSP = 0x2002FC00
CONTROL[1] =SP_process
but i have:
ICSR = 0x0000000F
PSP = 0x2002FC00
MSP = 0x2002FBFC
CONTROL[1] =SP_process
In conclusion : "pop" instruction get stack pointer from MSP but after incrementation value is stored into PSP.
This is fault in simulator?
Next question is that ICSR should not be changed to 0 after return to thread mode?
BR
Ryszard
I'm using SES in 3.22 Version, simulated cpu is STM32F427ZG - Cortex M4F.
What happen:
cpu is in Handler mode - SYSTICK occured and is handled.
Register values:
ICSR = 0x0000000F
PSP = 0x20000328
MSP = 0x2002FBFC
CONTROL[1] =SP_main
*0x2002FBFC = 0xFFFFFFFD
next instruction is : pop.w {pc}
This is return to thread mode so I expect that after execute this instruction registers value should be:
ICSR = 0x00000000
PSP = 0x20000328
MSP = 0x2002FC00
CONTROL[1] =SP_process
but i have:
ICSR = 0x0000000F
PSP = 0x2002FC00
MSP = 0x2002FBFC
CONTROL[1] =SP_process
In conclusion : "pop" instruction get stack pointer from MSP but after incrementation value is stored into PSP.
This is fault in simulator?
Next question is that ICSR should not be changed to 0 after return to thread mode?
BR
Ryszard