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.

ZStack 2.5.1a 设置P0_0为ADC采样,P0_0电压一高,ZigBee网络就卡死,是什么问题

Other Parts Discussed in Thread: CC2530

使用ZStack 2.5.1a,设置为终端节点,协调器广播方式

ADC采样通道P0_0和P0_7

P0_0电平一高,ZigBee网络就会卡死,甚至导致协调器的网络都卡死,其他终端都连不进协调器

初始化代码如下:

 void Init_ADC(void)
{
  P0SEL &= ~0x81;   // 1000 0001  IO
  P0DIR &= ~0x81;   // 1000 0001  INPUT
  P0INP |= 0x81;    // 1000 0001  High Res

  P1SEL &= ~0x10;   // 0001 0000  IO
  P1DIR |= 0x10;    // 0001 0000  OUTPUT
  P1INP &= ~0x10;   // 0001 0000  Up Or Down
  P2INP &= ~0x40;   //            Up

  P1_4 = 1;