Hi,
In my project, we are using MPC5777C processor. Currently we are in user mode and want to switch to supervisor mode, is there any instruction or command present to do so (except of generating interrupt).
Hi,
The only option is to trigger an exception (System Call can be used for this purpose) when the core is automatically switched to supervisor state. If it is needed to keep supervisor state after return from an exception, it can be done like this: SRR1 core register contains content of MSR latched at the time of exception, so the handler should only change the PR bit in SRR1 and return from the exception.
That’s the only way.
Regards,
Lukas