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.

TMS320C28346 data shifting

Other Parts Discussed in Thread: TMS320C28346

Hi there!

I am using a TMS320C28346 controlcard working together with a ADS1278-EVM using SPI-D. The goal is to sample data with the ADC and shift it to a PC via USB, which is accomplished by an extern USB-driver circuit.

Since I am getting the data on the DSP and this work's fine, I was wondering whether I could use the second SPI-A on the delfino to stream the data to the USB-driver.

I would have used this code to shift the data between the registers:

SpiaRegs.SPITXBUF = SpidRegs.SPIRXBUF;

I am using 16-bit data words, the SCLK on both SPI-D and SPI-A is the same. The data is getting into the DSP by using the SPI-D FIFO. By using the SPI-D interrupts (SPIRXINTD), data can be shifted out of the FIFO as soon as all FIFO words are filled (for example into a array).

The issue I am having is the SPI clock of the SPI-A: it starts too late and only has one word length (16-bit) which leeds to missing data of the SPI-D receive register. Do I need to initialize the FIFO of SPI-A with the same length? Has anyone an idea how to shift the data the best way?

Would it be better to first store the data within the DSP and then shift it to the second SPI (some kind of data ping-pong)?

Thank you very much in advance!

Johannes