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串口唤醒PM2休眠,数据格式不正确这是为什么

我在休眠钱配置串口1 的RX成普通GPIO 

//休眠前设置成普通IO
P1SEL &= ~(1<<7); //设置P1.7为普通IO口 
P1DIR &= ~(1<<7); //p1_7设置为输入
P1IEN |= (1<<7); //开P1_7的IO中断使能
IEN2 |= (1<<4); //P1中断

在休眠唤醒后重新设置为RX

PERCFG |= 0x02; 
P1SEL |= (1<<7); 
P2SEL |=0X20;

可以唤醒休眠,但是串口1收到数据不正确,这是为什么,而且我在串口1中断重新配置串口1也不行?求解答,谢谢。。。很急