Part Number: TMS570LC4357
Hello.
I'm trying to receive data from a SCI device and copy the data to the RAM using the DMA. I receive burst of data (length is unknown) from others equipements, and poll the copied data using a periodic thread.
I set up a DMA transfer of 1byte as element size, 1 element per frame, the number of frame as the size (in byte) of the receiving buffer and activate the autoinitiation.
I understood from the documentation at "20.2.4 DMA Channel Control Packets" that the working control packet won't be up-to-date unless an arbitration occured. To do so, I run 2 'dummy' DMA transfert of 8bytes from RAM to RAM in parallel, to force an arbitration of both FIFO. I don't use informations from FIFO A or B because it's not possible to make an atomic read of all the fifo's registers.
I observe that forcing the arbitration works all the time but in one specific case : when the transfer completely fill the reception buffer and no more transfer occurs.
Let's take an example, I use a 32byte reception buffer ( It's start at 0x80700100 and ends at 0x8070011f), the buffer is filled with 0xFF at startup.
- The reception buffer is : >ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff <
- A transfer of 18 bytes start (with values from 0x00 to 0x11)
- During the transfer, a read operation occurred :
The reception buffer is >00 01 02 03 04 05 06 07 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff <
The CDADDR of the Working Control Packet is 0x80700108, which is OK. - An another read operation occured after the end of the transmission:
The reception buffer is >00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 ff ff ff ff ff ff ff ff ff ff ff ff ff ff <
The CDADDR of the Working Control Packet is 0x80700112, which is OK and up to date. - An another transfer of 14 bytes start ( with values from 0x11 to 0x1e)
- During the 2nd transfer, a read operation occurred :
The reception buffer is >00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 11 12 13 14 15 16 17 18 19 1a 1b ff ff ff <
The CDADDR of the Working Control Packet is 0x8070011d, which is OK. - An another read operation occured after the end of the transmission:
The reception buffer is >00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e <. Completely filled.
The CDADDR of the Working Control Packet is 0x8070011e, which is not up to date. (Even though the arbitration of both FIFOs were made multiple times)
The Block Transfert Complete interruption was received.
The registers in the Working Control packet won't change until a another transfer occured.
Is that behaviour normal and expected from the DMA as I don't see any information about this specific case in the documentation ?
Meaning that when a block transfer is complete the Working control packet won't be updated in any case.
Regards






