I followed the 《JN516x Integrated Peripherals API User Guide》to add UART1 for the coordinator in method vStartup() like follows:
vAHI_UartSetRTSCTS(E_AHI_UART_1,FALSE);
bAHI_UartEnable(E_AHI_UART_1,Tx_Buf,Tx_Buf_Lenth,Rx_Buf,Rx_Buf_Lenth);
vAHI_UartSetBaudRate(E_AHI_UART_1,E_AHI_UART_RATE_115200);
vAHI_UartSetInterrupt(E_AHI_UART_1,FALSE,FALSE,FALSE,TRUE,E_AHI_UART_FIFO_LEVEL_8);
vAHI_Uart0RegisterCallback(vDeviceCallBack);
sprintf((char*)Datas,"test12345678");DBG_vPrintf(TRACE_APP,"test");
u16AHI_UartBlockWriteData(E_AHI_UART_1,(uint8*)Datas,(uint16)strlen((char*)Datas));
tmp=u16AHI_UartReadTxFifoLevel(E_AHI_UART_1);
DBG_vPrintf(TRACE_APP,"test%d\n",tmp);
tmp=u16AHI_UartReadTxFifoLevel(E_AHI_UART_1);
DBG_vPrintf(TRACE_APP,"test%d\n",tmp);
tmp=u16AHI_UartReadTxFifoLevel(E_AHI_UART_1);
DBG_vPrintf(TRACE_APP,"test%d\n",tmp);
tmp=u16AHI_UartReadTxFifoLevel(E_AHI_UART_1);
DBG_vPrintf(TRACE_APP,"test%d\n",tmp);
tmp=u16AHI_UartReadTxFifoLevel(E_AHI_UART_1);
DBG_vPrintf(TRACE_APP,"test%d\n",tmp);```
But the uart1 doesn't output anything. However, when I check the UART1 Fifo, it seems that the message has been sended. What else should I do to enable the UART1?
Hi Xinggquan,
Please look at the next community post.
https://community.nxp.com/thread/462011
Regards,
Mario