AnsweredAssumed Answered

SPC5EL60L3 - ivor_exit

Question asked by alem_ on Feb 21, 2017
Latest reply on Feb 23, 2017 by Erwan Y

Hello everyone, I'm working with SPC56EL60L3.

I'm doing some functional testing, and sometimes my application gest stuck.

This morning I found it stuck once again, I took a look using the debugger and I found it was exceuting _ivor_exit (please see the picture below)




Looking at the startup code (ivor.s), I found the following code, which looks like the only piece of code related to ivor_exit.




* _IVOR10 handler (Book-E decrementer).
.align 4
.globl _IVOR10
.type _IVOR10, @function
/* Creation of the external stack frame (extctx structure).*/
e_stwu sp, -80(sp) /* Size of the extctx structure.*/


e_stmvsrrw 8(sp) /* Saves PC, MSR. */
e_stmvsprw 16(sp) /* Saves CR, LR, CTR, XER. */
e_stmvgprw 32(sp) /* Saves GPR0, GPR3...GPR12. */


/* Reset DIE bit in TSR register.*/
e_lis %r3, 0x0800 /* DIS bit mask. */
mtspr 336, %r3 /* TSR register. */


#ifndef _SPC570Sxx_
/* Restoring pre-IRQ MSR register value.*/
mfSRR1 %r0


/* No preemption, keeping EE disabled.*/
se_bclri %r0, 16 /* EE = bit 16. */
mtMSR %r0


e_b _ivor_exit


Reading the documentation I found IVOR_10 is related to decrementer interrupt.

As far as I understand, decrementer can be used for implementing software timing.

OK, what if I don't need decrementer (and I don't want its interrupt to interfere with my application?).

One more thing:


I found the following sentence on the programmers manual:


"MSR[EE] also enables external input and decrementer interrupts." (RM004, page 272)


It looks like whenever I enable interrupts setting the EE flag in MSR register (I use irqIsrEnable(), for this), it also enables decrementer interrupts.

What If I don't want decrementer interruotys to be enabled?

Should I make any changes to irqIsrEnable()?

Thank you.