Skip to main content
Renesas Electronics America - Knowledgebase

How do I manipulate PSW.IPL directly in user mode?

Last Updated:05/17/2017


I want to manipulate PSW.IPL directly from the task by using "set_ipl" instead of "chg_ims" to mask non-kernel interrupts, but I can't do it because it is in user mode during task execution. How do I overcome this issue?


PSW.IPL can only be changed in supervisor mode as tasks are always run in user mode. If you implement it as an interrupt handler, it will be in supervisor mode. The interrupt handler can be called using CC-RX's built-in function "int_exception." Interrupt vector numbers 1 to 8 are reserved for RI600V4, so use other numbers.

* In handlers, PSW.IPL should not be lower than when processing starts.


Suitable Products