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_7捕获输入无法拉低。

P1_7 配置为捕获输入,低电压只能拉为1v

将P0_2配置为捕获输入,低电平为0v

P0_2:

P0SEL |= ( 1<<2 ); 
P0DIR &= ~( 1<<2 );
PERCFG &= ~( 1<<6 ); 
T1CCTL0 |= ( 1<<0 );
T1CCTL0 &= ~( 1<<1 ); 
T1CCTL0 &=~( 1<<2 ); 

P1_7:

P1SEL |= ( 1<<7 ); 
P1DIR &= ~( 1<<7 ); 
PERCFG |= ( 1<<5 ); 
T3CCTL1 &= ~(1<<2); 
T3CCTL1 &= ~( 1<<1 );
T3CCTL1 |= ( 1<<0 );