This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LS3137: DMA Config Control Packet

Part Number: TMS570LS3137

Hello, where can I find the possible values that can be taken by the codes written below. I mean, I want to learn how to determine the values. For example, g_dmaCTRLPKT.AUTOINIT  = AUTOINIT_ON can also be written as g_dmaCTRLPKT.AUTOINIT  = AUTOINIT_OFF. 

Is there any guide to understand these concepts and possible values that can be given? or, for instance, how is "element destination offset" used?

codes:

void dmaConfigCtrlPacket(uint32 sadd,uint32 dadd,uint32 dsize)
{

g_dmaCTRLPKT.SADD = sadd; /* source address */
g_dmaCTRLPKT.DADD = dadd; /* destination address */
g_dmaCTRLPKT.CHCTRL = 0; /* channel control */
g_dmaCTRLPKT.FRCNT = 1; /* frame count */
g_dmaCTRLPKT.ELCNT = dsize; /* element count */
g_dmaCTRLPKT.ELDOFFSET = 4; /* element destination offset */
g_dmaCTRLPKT.ELSOFFSET = 0; /* element destination offset */
g_dmaCTRLPKT.FRDOFFSET = 0; /* frame destination offset */
g_dmaCTRLPKT.FRSOFFSET = 0; /* frame destination offset */
g_dmaCTRLPKT.PORTASGN = 4; /* port b */
g_dmaCTRLPKT.RDSIZE = ACCESS_16_BIT; /* read size */
g_dmaCTRLPKT.WRSIZE = ACCESS_16_BIT; /* write size */
g_dmaCTRLPKT.TTYPE = FRAME_TRANSFER ; /* transfer type */
g_dmaCTRLPKT.ADDMODERD = ADDR_INC1; /* address mode read */
g_dmaCTRLPKT.ADDMODEWR = ADDR_OFFSET; /* address mode write */
g_dmaCTRLPKT.AUTOINIT = AUTOINIT_ON; /* autoinit */
}

thanks in advance :)

  • Hello,

    Please refer to the section of "channel configuration" in DMA chapter of device TRM (reference manual).

    When Auto-initiation Mode is enabled for a channel and the channel is triggered by a software request for a block transfer, the channel will restart again using the same channel information stored at the respective control packet after one block transfer is completed.

    In the case of Hardware Request the channel needs to be retriggered each time after a block is complete even if auto-initiation is enabled. 

    If DMA is enabled, the SPI transmit DMA request is generated when both the TX shift register and TXBUF are empty. The SPI receive DMA request is generated when both SPIBUG and RXBUF are empty. Those requests are Hardware Request, so Auto-initiation mode is ignored.

  • Hi Wang, thanks for your reply. I will look into it.