User`s manual

RX62N Group, RX621 Group 6. RX-specific notes
6. RX-specific notes
6.1. Interrupts and processor mode
The RX CPU has two processor modes; supervisor and user.
The API driver functions will be executed by the CPU in user mode.
However, any callback functions which are called by the API interrupt handlers will be executed by the CPU in
supervisor mode.
This means that the privileged CPU instructions (RTFI, RTE and WAIT) can be executed by the callback function
and any function that is called by the callback function.
The user must:
1. Avoid using the RTFI and RTE instructions.
These instructions are issued by the API interrupt handlers, so there should be no need for the user’s code to
use these instructions.
2. Use the wait() intrinsic function with caution.
This instruction is used by some API functions as part of power management, so there should be no need for the
user’s code to use this instruction.
More information on the processor modes can be found in §1.4 of the RX Family software manual.
6.2. Interrupts and DSP instructions
The accumulator (ACC) register is modified by the following instructions:
i. DSP (MACHI, MACLO, MULHI, MULLO, MVTACHI, MVTACLO and RACW).
ii. Multiply and multiply-and-accumulate (EMUL, EMULU, FMUL, MUL, and RMPA)
The accumulator (ACC) register is not
pushed onto the stack by the API interrupt handlers.
If DSP instructions are being utilised in the users’ code, callback functions which are called by the API interrupt
handlers should either
a) Avoid using instructions which modify the ACC register.
b) Take a copy of the ACC register and restore it before exiting the callback function.
R20UT0084EE0112 Rev.1.12 Page 6-1
July. 16, 2014