How to start a DMA transfer in MPC824X?

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

How to start a DMA transfer in MPC824X?

Jump to solution
1,037 Views
hariy
Contributor I
The datasheet says that,if I setup the SAR,DAR,BC,I just need to do a 0->1 transition of CS bit,the DMA shall start.But when did that,the DMA has no responce,no interrupt,the status register keeps being 0.Did I forget something??
I did this with a linux driver,I put it here...any help will be very appreciated.
 
thanks
 
0 Kudos
1 Solution
483 Views
TomE
Specialist II

Two steps are missing in the original post.

 

8.3.1 DMA Direct Mode

 

1. Poll the DSR[CB] bit to make sure the DMA channel is idle.
2. Initialize the SAR, DAR, and BCR.
3. Initialize the CTT bit in the CDAR to indicate the type of transfer.
4. Initialize the CTM bit in the DMR to indicate direct mode. Other control parameters in the DMR
can also be initialized here, if necessary.
5. Clear and set the DMR[CS] bit to start the DMA transfer.

 

There are also chaining mode register bits that have to be set up properly if you are fixing one of the addresses.

 

In case you're running a virtual memory system, the DMAC has to be loaded with physical addresses, not virtual ones.

 

Are you snooping properly?

 

Polling the registers stalls the DMA (detailed in "8.3.5 DMA Performance"), so don't poll the status register.

 

Are you performing memory/memory transfers or to and from the PCI?

 

Tom

 

View solution in original post

0 Kudos
2 Replies
483 Views
sergiosmcr
Contributor I

Were you able to make the DMA work? (I got the same issue)

0 Kudos
484 Views
TomE
Specialist II

Two steps are missing in the original post.

 

8.3.1 DMA Direct Mode

 

1. Poll the DSR[CB] bit to make sure the DMA channel is idle.
2. Initialize the SAR, DAR, and BCR.
3. Initialize the CTT bit in the CDAR to indicate the type of transfer.
4. Initialize the CTM bit in the DMR to indicate direct mode. Other control parameters in the DMR
can also be initialized here, if necessary.
5. Clear and set the DMR[CS] bit to start the DMA transfer.

 

There are also chaining mode register bits that have to be set up properly if you are fixing one of the addresses.

 

In case you're running a virtual memory system, the DMAC has to be loaded with physical addresses, not virtual ones.

 

Are you snooping properly?

 

Polling the registers stalls the DMA (detailed in "8.3.5 DMA Performance"), so don't poll the status register.

 

Are you performing memory/memory transfers or to and from the PCI?

 

Tom

 

0 Kudos