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

Are any other ways to exit Handler mode to Thread mode on Cortex M processors?

Hi. I am developing small RTOS and I need to switch to thread mode from handler mode to do something, and this has to be done in thread mode.

I am testing RTOS on Cortex-M3 and M7 for a moment. I know that in hardware is set to exit handler mode if "magic value" is loaded to PC and the execution is transferred back to the point it was interrupted. But before that I need to do something and it has to be done in Thread mode.

Is any way to switch from Handler mode to Thread mode by writing to the registers? Or any other options?

I looked in documentation and it is not obvious to me if this is possible. 

Thank you.

Alex