Accessing QDMA Registers

Top  Previous  Next

The hardware’s QDMA registers may be accessed using the macro QDMA_REGISTERS that is defined by QDMA.H . Note that the QDMA registers may only be written; any values returned by reading them are undefined. The fields correspond to the QDMA registers described in the TI documentation. Explicitly changing  Opt requires you to ensure that the value has the TCC, TCCM and TCINT fields set as for QDMA_Perform. This  is done for you if you set Opt using QDMA_Restart (see below).

 

A transfer can be started by assigning the final or only changed value to a pseudo register using the macro QDMA_Restart. You should not touch the QDMA pseudo registers explicitly; these are managed for you by Diamond.

 

The macro takes three parameters: QDMA_Restart(I, R, V):

 


I

The QDMA Interface


R

The register to be modified


V

The value to assign to the register

 

For example, assuming a previous transfer had been carried out using QDMA_Perform:

 

QDMA_REGS *Q = QDMA_REGISTERS;

Q->Src = &input_buffer;

QDMA_Restart(QdmaI, Q->Dst, &output_buffer);

 

This starts the transfer by assigning Q->Dst and then waits for completion in the same way as QDMA_Perform. It uses the same return values.