Skip to main content
Knowledgebase
Home
Renesas Electronics America - Knowledgebase

Why can't I rewrite the PM in PSW to switch from supervisor to user mode?

Latest Updated:06/20/2013

Question:

I want to rewrite the processor mode select bit (PM) in the processor status word (PSW) to switch from supervisor mode to user mode, but it won't rewrite.

Answer:

The PM bit in the PSW cannot be rewritten in supervisor mode. Execute an RTE instruction when the value of the copy of the PM bit in the PSW register that has been preserved on the stack is "1" or an RTFI instruction when the value of the copy of the PM bit in the PSW register that has been preserved in the backup PSW register (BPSW) is "1".
For more information, please refer to the "Processor Mode" section in the "CPU" chapter of the hardware manual."
Suitable Products
RX62N, RX621
RX62T
RX610
RX62G
RX630
RX63N, RX631
RX63T
RX210
RX220
RX110
RX111