This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2530 P1_3设置为下降沿外部中断后,在外部一直高电平情况下会被莫名触发。

zstack 2.5.1a

初始化:

P1SEL &= ~0x48; //P1_6 P1_3 设置为通用IO口 
P1DIR &= ~0x48; //P1_6 P1_3 设置为输入

P1INP &= ~0x48; //P1_6 P1_3 设置为上拉或下拉输入
P2INP &= ~0x40; //P1端口设置为上拉输入

IEN2 |= 0x10 ;// 开启P1中断
P1IEN |= 0x48 ;//开启P1_6 、P1_3 外部中断 
PICTL |= 0x06; //P1 端口配置为下降沿触发
P1IFG &= ~0x48; //清除中断标志位
P1IF = 0; 
EA = 1;

中断:

if( P1IFG&0x08 ) 
{
P1IFG &= ~0x08; 
osal_start_timerEx( GenericApp_TaskID,
GENERICAPP_KEY_EVT,
20);
}

P1IF = 0;