Hello NXP TechSupport,
may I ask another question?
According to this example,
there is only UART1 for receiving and sending data in while loop,
if I add another UART3(interrupt mode) for communicating with this UART1, even if the DMA callback was triggered with event "LPUART_UART_IP_EVENT_END_TRANSFER", my buffer(Rx_Buffer) is still keeping empty, I don't know what's wrong with my procedures.
please help me, thanks~
*This code flow below is fine while interrupt mode.
while(1)
{
lpuartStatus = Lpuart_Uart_Ip_AsyncReceive(UART_LPUART_INTERNAL_CHANNEL_1, Rx_Buffer, length);
if (LPUART_UART_IP_STATUS_SUCCESS != lpuartStatus)
{
return FALSE;
}
//Async send would be OVERRUN during 1.8Mbps baud rate
lpuartStatus = Lpuart_Uart_Ip_SyncSend(UART_LPUART_INTERNAL_CHANNEL_3, Tx_Buffer,length,1000);
if (LPUART_UART_IP_STATUS_SUCCESS != lpuartStatus)
{
return FALSE;
}
do
{
lpuartStatus = Lpuart_Uart_Ip_GetReceiveStatus(UART_LPUART_INTERNAL_CHANNEL_1, &remainingBytes);
} while (LPUART_UART_IP_STATUS_BUSY == lpuartStatus && 0 < T_timeout--);
}
(updated)
If I change the priority of DMA channel(UART RX) from 0 to 2, I can receive part of some message from UART3, like below attachment.