DMA Configuration for DMA Engine 2 Direct Mode for MPC8306

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

DMA Configuration for DMA Engine 2 Direct Mode for MPC8306

707 Views
manuelojea
Contributor II

We want to configure a DMA Direct Mode in the DMA engine 2.

I see in the MPC8306 Reference Manual for the register configuration, and I have a question regarding the DMAMR register.

The register DMAMR definition for the DRCNT is not clear. This bits is defined as "DMA request count. This field specifies the number of cache lines transferred per DMA request assertion".

We need to know the relationship between the definition of these bits with the DMA size value set in the register DMABCR.

For example, if we configura a 128 Byte DMA which value should be programed in the DMAMR[DRCNT].

Thank you in advance.

0 Kudos
2 Replies

537 Views
Pavel
NXP Employee
NXP Employee

DRCNT specifies the number of cache lines transferred per DMA request assertion

If DRCNT=0b0101 then 32 bytes are transferred per DMA request.

BWC field determines how many data a given channel is allowed to transfer after it is granted access to the IOS interface and before it releases the interface to the next channel. This parameter doesn't allow a single channel to monopolize IOS.

The MPC8306 provides internal DMA request signals. This processor does not have external DMA request signal.

Values the DRCNT and BWC provide different IOS interface utilization and bus loading.

Set the DMAMR[DRCNT] to 4 cache lines if 128 bytes data transfers is needed.

Have a great day,
Pavel Chubakov

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

537 Views
manuelojea
Contributor II

Thanks for your help.

I have another question:

The DMAMR[DRCNT] counter is limited to 1,2,4,8,16 and 32.

This means that DMA access can not be made of, for example, 160 bytes, because for this size the value in the register should be 5 cache lines.

In this case, we should configure the value in DMAMR[DRCNT] to 4 and the DMA engine mades to requests to transfer the 5 cache lines or we should configure to the next higher value to transfer 5 cache lines and then the DMA engine stops the accesses.

Regards.

Manuel Ojea

0 Kudos