Exception occurs when setting EE bit in MSR, MPC8569E-MDS-PB.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Exception occurs when setting EE bit in MSR, MPC8569E-MDS-PB.

1,009 Views
sergioluna
Contributor I

Hello,

I am working with the evaluation board MPC8569E-MDS-PB. I am currently developing ethernet drivers, which are already working with UCC1 and UCC2 in RGMII mode without interrupts. I can check that both modules send a receive frames to and from the network. However, I am having problems when trying to use interrupts when a frame is received. Everything is configured correctly, I have mapped UCC1 interrupts to QUICC Engine Low signal, and routed said signal to the core signal int. I have appropriately set values for registers IIVPR30 and IIDR30 (QUICC Engine Low is the internal interrupt number 30), and I can see that when a frame is received in UCC1, bit A (Activity) in IIVPR30 is set to 1, indicating that the interrupt has been requested to the core.

The problem comes when trying to set the EE bit in the MSR core register. In order for the core to service external interrupts, this bit must be set, and by default it is not. Furthermore, this bit will be cleared when an external interrupt occurs, and it must be set again as one of the first steps in the interrupt service routine to allow nesting of interrupts. However, whenever I try to set this bit to one, with the assembly instruction:

wrteei 1;

I lose control of the program flow when debugging, and when I stop the program it is alwas somewhere in the memory region of 0xFFFB4xxx, and never returns.

Setting EE also enables decrementer, fixed-interval timer and performance monitor interrupts. However, these can be masked by bits TCR[DIE], TCR[FIE] and PMGC0[PMIE] respectively, and I check that all of them are zero when I try to set EE to 1, so none of them should create an interruption.

Caches are disabled. MSR has the value 0x02001200 when I try to set EE to 1, which means:

UCLE = 0, SPE = 1, WE = 0, CE = 0, EE = 0, PR = 0, FP = 0, ME = 1, FE0 = 0, UBLE = 0, DE = 1, FE1 = 0, IS = 0, DS = 0, PMM = 0.

Am I doing something wrong? Is there another way to set EE to 1 that wouldn't cause this interrupt to happen, or a way to know what caused this interruption and how to avoid it?

Thank you very much. Best regards,

Sergio Luna.

Tags (4)
0 Kudos
1 Reply

618 Views
lunminliang
NXP Employee
NXP Employee

Hi,

Does this happen if you mask external interrupt?

Can you see what's the code when stopping program?


Have a great day,

Lunmin

0 Kudos