how to enable UART1 for JN516x in JN-AN-1184 application?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to enable UART1 for JN516x in JN-AN-1184 application?

643 Views
xingquanjiang
Contributor I

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?

0 Kudos
1 Reply

432 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Xinggquan,

Please look at the next community post.

https://community.nxp.com/thread/462011 

Regards,

Mario

0 Kudos