"edma_transfer_s32k144" example project Confusion

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

"edma_transfer_s32k144" example project Confusion

ソリューションへジャンプ
982件の閲覧回数
shivamshankarg
Contributor III

Hello, I am trying to understand "edma_transfer_s32k144" example project for S32K144 EVB in S32 Design Studio.
In the edmaTransfer.c file there are 3 functions:-

void triggerSingleBlock(uint8_t channel, uint8_t * srcBuff, uint8_t * dstBuff, uint32_t size);

void triggerLoopTransfer(uint8_t channel, uint8_t * srcBuff, uint8_t * dstBuff, uint32_t size);

void triggerScatterGather(uint8_t channel, uint8_t * srcBuff, uint8_t * dstBuff, uint32_t size);

I am little bit confused about the first 2 like what are the advantage or disadvantage between SingleBlock & LoopTransfer function, also how these are different from scatter gather transfer could you please help me to understand that?

I am also attaching the files.

Many Thanks!

ラベル(1)
1 解決策
931件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Shivam,

these are typical use cases.

Single block transfer can be used when you need to copy block of data from one place to another.

Loop transfer - this is usually used to manage data flow to/from peripherals. For example, you can use DMA to transmit data via UART. In this case, anytime when transmit buffer of LPUART module is empty, hardware request is asserted to DMA and DMA will write one word from a user buffer to LPUART data register. So, word by word is transferred on each hardware request until the major loop is completed.

Scatter gather then allows you to use one DMA channel for different transfers in a chain with no software intervention. Once first major loop (first descriptor) is completed, scatter gather feature will load new descriptor (from RAM or from flash), so it doesn't need to be done by user. If more such transfers is necessary, it can be done in chain.

Regards,

Lukas

元の投稿で解決策を見る

1 返信
932件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Shivam,

these are typical use cases.

Single block transfer can be used when you need to copy block of data from one place to another.

Loop transfer - this is usually used to manage data flow to/from peripherals. For example, you can use DMA to transmit data via UART. In this case, anytime when transmit buffer of LPUART module is empty, hardware request is asserted to DMA and DMA will write one word from a user buffer to LPUART data register. So, word by word is transferred on each hardware request until the major loop is completed.

Scatter gather then allows you to use one DMA channel for different transfers in a chain with no software intervention. Once first major loop (first descriptor) is completed, scatter gather feature will load new descriptor (from RAM or from flash), so it doesn't need to be done by user. If more such transfers is necessary, it can be done in chain.

Regards,

Lukas