Hi,
which demo do you refer to? If DMA is updating your buffer with less bytes comparing previous transfer, a not overwritten bytes will be kept. You can clear buffer after reading it.
BR, Petr
hi Peter,
I just send you a private message, please check your message box.
Hi,
I read that, but not sure what is the intention, rather send full project and describe desired functionality and present behavior (what is sent, received and what is desired result).
BR, Petr
Hi Peter,
How's it going now that I sent you a private message the other day
Hi Peter,
Please check the private message.
I don't know where to clear the rx buffer.
Reference:
/* Handle idle line interrupt */
if (LPUART_GetIntMode(base, LPUART_INT_IDLE_LINE))
{
if (LPUART_GetStatusFlag(base, LPUART_IDLE_LINE_DETECT))
{
lpuart_state_t * lpuartState = (lpuart_state_t *)s_lpuartStatePtr[instance];
lpuartState->rxCallback(lpuartState, UART_EVENT_RX_FULL, lpuartState->rxCallbackParam);
if (lpuartState->rxSize > 0U)
{
/* Set the source address and the number of minor loops (bytes to be transfered) */
EDMA_DRV_SetDestAddr(lpuartState->rxDMAChannel, (uint32_t)(lpuartState->rxBuff));
EDMA_DRV_SetMajorLoopIterationCount(lpuartState->rxDMAChannel, lpuartState->rxSize);
/* Now that this rx is set up, clear remaining bytes count */
lpuartState->rxSize = 0U;
/* Re-start the channel */
(void)EDMA_DRV_StartChannel(lpuartState->rxDMAChannel);
}
else
{
/* Stop the reception */
LPUART_DRV_StopRxDma(instance);
/* Invoke the callback to notify the end of the transfer */
if (lpuartState->rxCallback != NULL)
{
lpuartState->rxCallback(lpuartState, UART_EVENT_END_TRANSFER, lpuartState->rxCallbackParam);
}
/* Clear the flags */
LPUART_DRV_ClearErrorFlags(base);
}
LPUART_ClearStatusFlag(base, LPUART_IDLE_LINE_DETECT);
}
}