both Chip_GPDMA_PrepareDescriptor and Chip_GPDMA_SGTransfer call Chip_GPDMA_InitChannelCfg

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

both Chip_GPDMA_PrepareDescriptor and Chip_GPDMA_SGTransfer call Chip_GPDMA_InitChannelCfg

659件の閲覧回数
ssudhir
Contributor II

Hi,

Both  Chip_GPDMA_PrepareDescriptor and   Chip_GPDMA_SGTransfer functions call  Chip_GPDMA_InitChannelCfg. According to few posts we need to use descriptor we need to call both these functions. In that case calling Chip_GPDMA_InitChannelCfg in both functions looks like an error. Is it?

Also do have a better documents explaining  how to receive a unknown packet size using DMA and when to use descriptors and when to use Chip_GPDMA_Transfer?

Thanks

0 件の賞賛
返信
1 返信

592件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello

1) " In that case calling Chip_GPDMA_InitChannelCfg in both functions looks like an error. Is it?"

-> No, there is no error.

2)  "when to use descriptors and when to use Chip_GPDMA_Transfer"

-> You can have a look at the demo "periph_uart" under LPCopen.

3)" how to receive a unknown packet size "

-> For this  question, I think the size of DMA transfer is define by yourself. For example, the

receive packet is 150, you set the DMA transfer number is 100, thus, after DMA transfer 100 bytes,

DMA run into interrupt, in interrupt function, config DMA, start the second transfer, this time, it only

transfer 50bytes, so it won't interrupt, while the 50 bytes have also been transfered to memory.


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.
-------------------------------------------------------------------------------

0 件の賞賛
返信