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.

TMS320F28379D: Initial data loss in the SPI

Part Number: TMS320F28379D


Hi,

I'm trying to establish SPI transmission between two TMS320F28379D control card boards. 

I see that the initial few bytes of the transmission are being lost. For eg: when I send a count of 1 to 128, my receiver array (tied to DMA destination) holds data only from 21 or sometimes 31. This is inconsistent. 

When I send only 5 bytes of data, the receiver doesn't pick up anything. 

(I used "Example_2837xD_Spi_dma.c" from device support of C2000 as reference and I have pretty much done everything as specified in that example).

Could you please help me with this issue?  

  • Is the data being transmitted as expected? If you look at the signals with a logic analyzer or scope, do you see the expected data? Can you narrow down whether the issue appears to be originating in the SPI or the DMA?

    When you say the receiver array only contains data from 21 or 31 onward, is that starting with index 0 of the array or is it that the array contains incorrect data for the first 20 or 30 entries?

    Whitney

  • Hi Whitney,

    The problem has been solved. 

    The register update to connect the Peripheral Frame 2 bridge to the DMA, i.e, 

    CpuSysRegs.SECMSEL.bit.PF2SEL = 1;

    was being done after I started the DMA channel. That's why I was losing the initial few data bytes. 

     I reordered the statements and it worked. 

    Thank you for the response. You could go ahead and close the thread. 

    Thanks,

    Shamanth