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
Thanks for your replay. I think I need to use PendSV. I don't see other way.
Thank you