MPC5777C: Jump to supervisor mode

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MPC5777C: Jump to supervisor mode

858 次查看
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 项奖励
回复
1 回复

836 次查看
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 项奖励
回复