DMA UART1 TX

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

DMA UART1 TX

584件の閲覧回数
ssudhir
Contributor II

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

0 件の賞賛
返信
3 返答(返信)

484件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信

484件の閲覧回数
ssudhir
Contributor II

Thanks for the response.

Do we need to get a free channel for each transfer or only once?

Thanks

On Wed, Jun 26, 2019 at 5:44 AM xiangjun.rong <admin@community.nxp.com>

0 件の賞賛
返信

484件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信