MPC5777C: Jump to supervisor mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC5777C: Jump to supervisor mode

857 Views
aporvasrivastava
Contributor I

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).

 

 

0 Kudos
Reply
1 Reply

835 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply