Qoriq P1016 dma from a port device

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Qoriq P1016 dma from a port device

跳至解决方案
721 次查看
PaulWalker
Contributor III

Can DMA be used to transfer data via a local bus i/o port (i.e. static, non-incrementing address) to a RAM block (i.e. normal incrementing address block)?

The i/o port is 16-bit local bus address, and I want to do 4K byte transfers.

I cant see any way to specify the non-incrementing port address behaviour.

Regards,

Paul

标签 (1)
标记 (1)
0 项奖励
1 解答
573 次查看
r8070z
NXP Employee
NXP Employee


Have a great day

,

Yes DMA_MR register fields address hold enable (SAHE/DAHE) and transfer size (SAHTS/DAHTS) are right for task like yours. For example if you want move data from 16-bit i/o port to the RAM buffer then you should set SAHE = 1 and SAHTS = 01 (2 bytes) and DAHE=0 (in this case DAHTS settings is ignored).

In the simplest case you can use basic direct mode, the DMA controller does not read descriptors from memory, but instead uses the current parameters programmed in the DMA registers to start the DMA transfer.

Software is responsible for initializing SARn, SATRn, DARn, DATRn, and BCRn registers. The SARn and SATRn[ESAD] points to the io port address (SATRn[ESAD] contains the four high-order bits of the 36-bit source address .) DARn and DATRn points to start of the RAM buffer, BCRn set to number of bytes to transfer.  The transfer is started when MRn[CS] is set. More details see in the manual’s section “ Basic direct mode”

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
2 回复数
573 次查看
PaulWalker
Contributor III

The reference manual (P1025RM) has DMA_MR register fields address hold enable (SAHE/DAHE) with corresponding transfer size (SAHTS/DAHTS).

Doe this provide a constant address feature at each end?

Can you give an example how I should have it set-up?

So for a 16-bit constant address source port I assume SAHTS=1 and SAHE=1

Regards,

Paul

0 项奖励
574 次查看
r8070z
NXP Employee
NXP Employee


Have a great day

,

Yes DMA_MR register fields address hold enable (SAHE/DAHE) and transfer size (SAHTS/DAHTS) are right for task like yours. For example if you want move data from 16-bit i/o port to the RAM buffer then you should set SAHE = 1 and SAHTS = 01 (2 bytes) and DAHE=0 (in this case DAHTS settings is ignored).

In the simplest case you can use basic direct mode, the DMA controller does not read descriptors from memory, but instead uses the current parameters programmed in the DMA registers to start the DMA transfer.

Software is responsible for initializing SARn, SATRn, DARn, DATRn, and BCRn registers. The SARn and SATRn[ESAD] points to the io port address (SATRn[ESAD] contains the four high-order bits of the 36-bit source address .) DARn and DATRn points to start of the RAM buffer, BCRn set to number of bytes to transfer.  The transfer is started when MRn[CS] is set. More details see in the manual’s section “ Basic direct mode”

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励