Hi all,
I am just trying to observe my receive buffer in continuous transfer while I changing transmit buffer content with SDK example (lpuart_edma_transfer). So here are my main changes in SDK example:
uint16_t iteratorXfer;
while (1)
{
/* If RX is idle and g_rxBuffer is empty, start to read data to g_rxBuffer. */
if ((!rxOnGoing) && rxBufferEmpty)
{
rxOnGoing = true;
LPUART_ReceiveEDMA(DEMO_LPUART, &g_lpuartEdmaHandle, &receiveXfer);
}
/* If TX is idle and g_txBuffer is full, start to send data. */
if ((!txOnGoing) && txBufferFull)
{
txOnGoing = true;
LPUART_SendEDMA(DEMO_LPUART, &g_lpuartEdmaHandle, &sendXfer);
}
/* If g_txBuffer is empty and g_rxBuffer is full, copy g_rxBuffer to g_txBuffer. */
if ((!rxBufferEmpty) && (!txBufferFull))
{
//memcpy(g_txBuffer, g_rxBuffer, ECHO_BUFFER_LENGTH);
for(iteratorXfer=0; iteratorXfer< sendXfer.dataSize; iteratorXfer++)
{
g_txBuffer[iteratorXfer] = iteratorXfer % 2;
}
sendXfer.data = g_txBuffer;
sendXfer.dataSize = sizeof(g_txBuffer) - 1;
rxBufferEmpty = true;
txBufferFull = true;
}
}
I just want to observe the data changes in the memory addresses. But this example expects us to input with the keyboard. I do not want keyboard intervention. I am just trying the simulate a real-life scenario in debug time. What should I do?
Thanks and Regards.
已解决! 转到解答。
Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
It needs to configure a DMA channel to store the UART received data to RAM, then you can observe the data changes in the RAM.
According to your statement, you don't want to use the keyboard to input the character to the UART, I think it's okay, however, you need to use another tool or board to transmit the characters to the UART to replace the keyboard.
Hope this is clear.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
It needs to configure a DMA channel to store the UART received data to RAM, then you can observe the data changes in the RAM.
According to your statement, you don't want to use the keyboard to input the character to the UART, I think it's okay, however, you need to use another tool or board to transmit the characters to the UART to replace the keyboard.
Hope this is clear.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------