This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

exeption return

Can anyone halp me? I writting by assembler for stm32f051.So I can't return from exception handling (in my case this is timer update event). I have read exception entry and return from fucking programing manual:
"
Exception return occurs when the processor is in Handler mode and executes one of the following instructions to load the EXC_RETURN value into the PC:
â— a POP instruction that loads the PC
â— a BX instruction using any register.
"
The processor performs a vector fetch that reads the exception handler start address from
the vector table. When stacking is complete, the processor starts executing the exception
handler. At the same time, the processor writes an EXC_RETURN value to the LR.
"
I do this way and nothing happening:

TIM2_IRQHandler
    ...
    HANDLING!!!
    ...
    push {lr}
    pop {pc}


next way:

TIM2_IRQHandler
    ...
    HANDLING!!!
    ...
    bx lr


lr during the exception has value 0xFFFFFFF9. I have no idea what happens after the interrupt handling, but program don't execute after exception entry.
I aprciate any help.