Hi,
As we mentioned earlier, we are using LPC4357. We have connected an embedded ethernet module to UART1. We are planning to use DMA for both RX and TX. To transmit a packet via DMA we have called
Chip_GPDMA_Transfer function. We are using ethernet to communicate with a socket based server application. The server App is receiving whatever is in that uartABStart – buffer.
Sample code
dmaChannelNumTx = Chip_GPDMA_GetFreeChannel(LPC_GPDMA, _GPDMA_CONN_UART_Tx);
Chip_GPDMA_Transfer(LPC_GPDMA, dmaChannelNumTx,
(uint32_t) &uartABStart[0],
_GPDMA_CONN_UART_Tx,
GPDMA_TRANSFERTYPE_M2P_CONTROLLER_DMA,
sizeof(uartABStart));
Now the question is, Do we need to call Chip_GPDMA_Transfer function Whenever we want to send a packet via DMA? Since that function call sets up that channel , is there different method to trigger DMA by giving the source address and size?
Thanks
Hi,
I think calling the Chip_GPDMA_Transfer() function is required when you want to send characters via DMA, calling the function will start the uart transfer.
Hope it can help you
BR
XiangJun Rong
Hi,
I do not think you need call the
dmaChannelNumTx = Chip_GPDMA_GetFreeChannel(LPC_GPDMA, _GPDMA_CONN_UART_Tx);
for each transfer, it is okay to call the function only once.
BR
XiangJun Rong