AnsweredAssumed Answered

MPC57xx external interrupt

Question asked by Jeff liu on Nov 16, 2016
Latest reply on Nov 22, 2016 by Martin Kovar

Hi NXP,

 

I have used MPC57xx platform in my project.

There is a question confused me about GPI and interrupt status.

I use PA2 as GPI.

The following sitting is PA2 config setting.

 

SIUL2.DIRER0.B.EIRE2 = 0 ;

SIUL2.DISR0.R = 1<<2;

SIUL2.IREER0.B.IREE0 =0 ;
SIUL2.IFEER0.B.IFEE0 = 1;


SIUL2.MSCR[2].B.SSS = 0 ;
SIUL2.IMCR[175].B.SSS = 1 ;


SIUL2.MSCR[2].B.OBE = 0;
SIUL2.MSCR[2].B.ODE = 0;
SIUL2.MSCR[2].B.IBE = 1;
SIUL2.MSCR[2].B.PUS = 1;
SIUL2.MSCR[2].B.PUE = 1;


SIUL2.DISR0.R = 1<<2;
// SIUL2.DIRER0.B.EIRE2 =1; //enable "external interrupt request_2"


After above PA2 config. and Interrupt setting I have always read "SIUL2.DISR0.R" and handly tie PA2 high or low to generate edge trigger.


Unfortunately, I always can't get any external interrupt status .

 

Does there something wrong in the above setting?


Please help me or give me some reference code.

Thanks


Best regards,
Jeff

Outcomes