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.

TMS320F28388D: How to configure TMS320f28388d to retrieve from ADS8588H over two spi channels

Part Number: TMS320F28388D


I'm trying to use the f28388d to trigger & retrieve ADC data using the two spi channels in THREE-WIRE mode.

Setup:

SPI-C Master - works as expected. SCLK causes the ADC to send data back on DOUTA.

SPI-D Slave:

  • Same configuration as the MASTER, except set for SLAVE
  • Master SCLK is connected to the SLAVE & ADC.
  • SLAVE Rx is connected to the ADC DOUTB.
  • Master ~CS (~SPISTE) is connected to the SLAVE ~SPISTE.

Data is sent from the ADC to SPI-D on the f28388d, the DSP does not receive the data in the Rx FIFO.

What am I missing?  Is this even possible?

Questions / Thoughts?

  • Hi Tim,

    Can you confirm if data is being transmitted to the RX buffer? What is going on with the SPIDAT?

    Since the SPI receive and transmit is happening by the same bi-directional SPI channel, the application software needs to take care of performing a dummy / real read to clear the SPI data register of the additional received data. In other words, since SPI has to operate in a full-duplex communication.

    The TALK bit also needs to be configured during operation as explained in the TRM sections 37.3.10 SPI 3-Wire Mode Description and 37.4.5 SPI 3-Wire Mode Code Examples.

    Best Regards,

    Aishwarya

  • Aishwarya,

    Thank you for your response.  

    I don't need to send any commands to the ADC from the f28388d, so the SPI master is set (talk = 0).  The master only provides the ~CS & SPICLK. The ADC DOUTA channel is connected to the Master according to SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 Figure 37-9 (Master) and Figure 37-10 (Slave).  The second SPI port (slave) configured the similar to the master with the following exceptions.

    • ADC DOUTB is connected
    • Configured as slave
    • CLKPolarity is inverted from the Master (this setting solved my issue)