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.

TMS570LC4357: SCI via DMA only transmits one byte at a time

Part Number: TMS570LC4357

Hello,

I am using DMA to get data from an external device connected to SCI3. To the best of my understanding (and according to the nice example https://www.ti.com/lit/an/spna213/spna213.pdf), the DMA "reads 32 bits at a time from the data RAM incrementing the address". Nevertheless, the data in my desination address is always 3 bytes of 0 and 1 byte of (correct) data.

For example, if the external device sends 0x3A45B, the desination address gets {0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0xA, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0xB};

I tried playing aroung with the parameters -mainly Read and Write sizes and offsets- but I fail to make it transmit all 32 bits of actual data.

Is there a way for the DMA to transmit all 32 bits from SCI?

Mysetup:

#define FRAME_TRANSFER 5

dmaCTRLPKT_RX.SADD = (uintptr_t) &(sciREG3->RD); /* source address */
dmaCTRLPKT_RX.DADD = (uintptr_t) shared_mem_p; /* destination address in shared RAM */
dmaCTRLPKT_RX.ELCNT = 1; /* element count */

dmaCTRLPKT_RX.CHCTRL = 0; /* (channel control) bufferId */
dmaCTRLPKT_RX.FRCNT = FRAME_LENGHT; /* frame count */
dmaCTRLPKT_RX.ELDOFFSET = 0; /* element destination offset */
dmaCTRLPKT_RX.ELSOFFSET = 0;
dmaCTRLPKT_RX.FRDOFFSET = 0; /* frame destination offset */
dmaCTRLPKT_RX.FRSOFFSET = 0; /* frame source offset */

dmaCTRLPKT_RX.PORTASGN = PORTB_READ_PORTA_WRITE;
dmaCTRLPKT_RX.RDSIZE = ACCESS_32_BIT;
dmaCTRLPKT_RX.WRSIZE = ACCESS_32_BIT;
dmaCTRLPKT_RX.TTYPE = FRAME_TRANSFER; /* transfer type */
dmaCTRLPKT_RX.ADDMODERD = ADDR_FIXED; /* address mode read */
dmaCTRLPKT_RX.ADDMODEWR = ADDR_INC1; /* address mode write */
dmaCTRLPKT_RX .AUTOINIT = AUTOINIT_OFF; /* autoinit

Cheers,
Arturo.