Qoriq P1016 dma from a port device

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Qoriq P1016 dma from a port device

Jump to solution
699 Views
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

Labels (1)
Tags (1)
0 Kudos
1 Solution
551 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
2 Replies
551 Views
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 Kudos
552 Views
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 Kudos