메인 콘텐츠로 건너뛰기
Knowledgebase
Home
Renesas Korea

Why is the result not output correctly when using a DSP instruction?

Latest Updated:12/18/2013

Question:

I used a DSP instruction, but the calculated result was not output correctly.

Answer:

Check that you are not using any of the following instructions, which use the accumulator (ACC), for interrupt handling.

  • DSP instructions (MACHI, MACLO, MULHI, MULLO, MVFACHI, MVFACMI, MVTACHI, MVTACLO, or RACW)
  • Multiply instructions (EMUL, EMULU, FMUL, or MUL)
  • Multiply-accumulate instruction (RMPA)

If you are using any of the above instructions, which use ACC, during interrupt handling, use one of the below methods to ensure the value of ACC.
(1) Use the interrupt enable bit (I) in the processor status word (PSW) to disable interrupts at the location of the DSP instruction.
(2) Retain and recover ACC at both the entrance and exit of the interrupt handling routine.
For more information on ACC, please refer to the "Accumulator" section in the "CPU" chapter of the hardware manual.

Suitable Products
RX62N, RX621
RX62T
RX610
RX62G
RX630
RX63N, RX631
RX63T