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 设置P04为定时器1捕获时输入拉低

Other Parts Discussed in Thread: CC2530

使用的协议栈为ZSTACK2.5.1

我在使用CC2530的时候,使用P04为TIMER1的捕获通道,输入的博习惯为一个3.3V的方波,在未设置P04为第二功能前,量P04脚为3.3V正常,一旦设置第二功能后,电压马上变为2V。此时将P04口设回来,不使用第二功能,又变回3.3V,请问这是什么道理?又有没有人知道

T1CNTL = 0x00; //timer 1计数清零,清相关管脚
PERCFG &= ~(1<<6); //采用备用位置1
P0DIR &= !0x10; //P0_4为输入口
P0SEL |= 0x10; //P0_4作为捕获通道,Channel2        这一句只要执行,电压马上变化

T1CTL |=0x01; //0分频32M,反复运行,打开定时器
T1IF =0; //timer 1 interrupt flag
T1CCTL0 |= 0x02; //下降沿捕获
T1CCTL0 &= ~0x04; //捕获模式
T1IE = 0; //TIMER1 interrupt disenable
T1OVFIM = 0;