Hi,
Thank you very much.
Now I have another question.
I let the DMA stay in the receiving mode to receive the data from the master.
The steps to let the bug reappear:
1.Start the receiving:
{
uint8_t rx0_buf[10],
uart_transfer_t receiveXfer;
receiveXfer.data = &rx0_buf[0];
receiveXfer.dataSize = 10;
UART_TransferReceiveDMA(DEMO_UART, &g_uartDmaHandle, &receiveXfer);
}
2.Restart the receiving again after receiving a frame
void UART_UserCallback(UART_Type *base, uart_dma_handle_t *handle, status_t status, void *userData)
{
if (kStatus_UART_RxIdle == status)
{
uint8_t rx0_buf[10],
uart_transfer_t receiveXfer;
receiveXfer.data = &rx0_buf[0];
receiveXfer.dataSize = 10;
UART_TransferReceiveDMA(DEMO_UART, &g_uartDmaHandle, &receiveXfer);
}
}
3.If sending 10 bytes in the master 10 times in 1s period, the receiving is OK every time.
Remark: The frame in the master---AA AA AA 8C 01 80 FB 02 00 01

4.But if sending 20 bytes in the master 10 times in 1s period, there is an error for the receiving. The DMA interrupt does not happen anymore after sending 10 times in the master. It seems that the DMA communication is dead.
Remark: The frame in the master----AA AA AA 8C 01 80 FB 02 00 01 12 12 12 12 12 12 12 12 12 12
How to restore the DMA communication in such case? Thank you.