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.

CC3220R调用Power_disablePolicy后死机

Other Parts Discussed in Thread: CC3220R

CC3220R显示调用Power_enablePolicy,使能lpds,芯片能正常进入低功耗。sleep(5)休眠5秒后芯片唤醒,调用Power_disablePolicy,禁止低功耗,之后无论是直接调用sleep还是等待信号量使程序阻塞,芯片就是死机。

如何才能在唤醒后禁止lpds?我的目的主要是唤醒后等待接受串口数据,但串口的接受并不能防止芯片进入低功耗,因此需要禁止低功耗。等到接受完数据或者接受超时,再开启低功耗。

试过调用Power_setConstraint(PowerCC32XX_DISALLOW_LPDS)和UART_control(uartHandle, UART_CMD_RXENABLE, NULL);效果和Power_disablePolicy一样,只要之后程序进入阻塞,就会死机。

但是在调用Power_enablePolicy之前,程序无论是sleep还是等待信号量,都是正常运行的。