TI中文支持网
TI专业的中文技术问题搜集分享网站

CC2640 使用四线串口,能正常发送第一包数据,但是主机发送完后没有进入低功耗的问题

主机发送完成数据后,没有执行发送完成回调函数,主机的SRDY没有被拉高,导致不能进入低功耗

juge90:

uint16 NPITLUART_writeTransport(uint16 len)

{    

 ICall_CSState key;   

  key = ICall_enterCriticalSection();        

TransportTxLen = len;

#ifdef POWER_SAVING    

TxActive = TRUE;

     // Start reading prior to impending write transaction    

     // We can only call UART_write() once MRDY has been signaled from Master    

     // device

    NPITLUART_readTransport();     在这里为什么要打开读,应为读的原因导致发送完成后SRDY不能被拉高,从而MRDY一直被牵引着(低电平)

 #else    

// Check to see if transport is successful. If not, reset TxLen to allow    

 // another write to be processed    

if(UART_write(uartHandle, TransportTxBuf, TransportTxLen) == UART_ERROR )    

{      

    TransportTxLen = 0;    

}

#endif //POWER_SAVING    

ICall_leaveCriticalSection(key);        

return TransportTxLen;

}

赞(0)
未经允许不得转载:TI中文支持网 » CC2640 使用四线串口,能正常发送第一包数据,但是主机发送完后没有进入低功耗的问题
分享到: 更多 (0)