hello:
when I use the program below:
P0 = 0xfe;
P0SEL = 0x00;
P0DIR = 0xfe; //P0.0 and P0.5 interrupt
P0INP = 0x01;
P2INP = 0x00;
cv = P0;
PICTL = 0x00;
P0IFG = 0x00;
P0IEN = 0x01;
IEN1 = 0x20;
aes_seed = 0x00000010;
rtc_s = 0;
add_st(65535);
IEN0 = 0x20; //enable the ST interrupt
EA = 1;
while(1);
HAL_ISR_FUNCTION(port0_ISR,P0INT_VECTOR)
{
unsigned char tt0,tt1,tt2,tt3;
unsigned int i33;
unsigned long i3;
// PCON = 0x00;
// SLEEPCMD = 0x84;
// CLKCONCMD = 0x00; //enable the 32MHz
if (P0IFG & 0x21)
{
EA = 0;
}
}
when there is a rising edge on the P0.0, I can't get an interrupt.
but if I change the PICTL from 0x00 to 0x01, I will get interrupt.
Please tell me how to get a rising edge interrupt?
Thanks a lot.
Fanhua Meng