Hi,
I am using SPI4 and DMA of TMS570LS3137
I am tx data from three distinct buffer to SPIDAT1 register of SPI 4(compatibility mode) using DMA.
I need to transmit data from buffers to SPIDAT1 in this order-
1st data of buffer1 to SPIDAT1, 1st data of buffer2 to SPIDAT1, 1st data of buffer3 to SPIDAT1 2nd data of buffer1 to SPIDAT1 , 2nd data of buffer2 to SPIDAT1, 3nd data of buffer3 to SPIDAT1
and so on.....
To achieve this I am using channel chaining option of DMA,
But the problem is Channel is not chaining properly.
For ex:
Buffer1={1,2,3,4,5,6,7,8, 9, 10}
Buffer2= {11,12,13,14,15,16,17,18,19,20}
Expected transmission sequence= 1,11,2,12,3,13,4,14,5,15,6,16,7,17,8,18,9,19,10,20
But I am getting something like this- 1,20,10,19,18,8,17,7,6,15,5,14,13,3,12,2,1 and repeat
Chain is missing as above and as the number of buffer elements increases the buffer elements are getting transmitted to SPIDAT1 more randomly.
I have set following things
SPI to 0.8Mhz
- assigned channles to high priority queue
- seleted channel Rotation scheme
- Parity is disabled
- FIFO is not bypassed.
- write and read data size is 32 bits( control word+data)
- frame count = 10, element count =1
- source frame index is 4, element index = 0
- dest frame index is 0, element index = 0
- auto init is enabled.
- channel 3 is chained to channel 2
- channel 2 is chained to channel 3.
- selected frame transfer type.
- read addressing mode is post-indexed, write addressing mode is constant.