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.

Independent use of SPI B in F28033

Other Parts Discussed in Thread: TMS320F28033, CONTROLSUITE

Hello everyone,

I am using the TMS320F28033 for an inverter control application. I need to use the SPI to access an external ADC which we need for grounding issue (the ground is not the same as the DSP ground so can't use DSP ADC). I also intend to use an external clock so I need to XCLKIN pin. And I need to use a JTAG for debugging so I need the TCK pin.

The XCLKIN and SPISTEA are shared - GPIO19 and TCK and XCLKIN are shared - GPIO38. So I am having a pin conflict. If I use the 80 pin chip with 28033, I have an SPIB with an SPISTEB pin. However, after reading the user documentation, it doesn't seem like SPI B has independent control. SPI B seems only for receiving the left and right speaker signals with one SPI signal. Is it possible to use SPI B independently? That is SPI A is not used at all but only SPI B? There seems only one bit STEINV bit in SPIPRI register that enables the SPI B channel. But I am assuming that I will have no access to SPISTEA or SPI A but will use only SPI B. Is this possible?

Thanks in advance.

  • Hello,

    There is no restriction on the usage of SPIB. There are multiple instances of the SPI module that can be independently controlled on this device. You can use both SPI modules independently. The audio example is merely that, an example of how you might use the two instances of SPI together to sample left and right channel audio using the STEINV bit. (i.e. SPIA uses active Low SPISTE, and SPIB uses active high SPISTE). This is not the only usage of the modules available to you.

    Regards,
    Mark
  • Hello,

    Thanks for your quick response. Another follow up question. Are there separate registers for SPI A and SPI B? For example, SPICTL register does not specify which SPI channel is being controlled. Will there be a SPICTLA and SPICTLB? If not, how will SPI B be configured? Will the configuration extend to both simultaneously? If I use the XCLKIN pin instead of the SPISTEA pin in GPIO19 and configure SPI registers, will it be a problem?

    Thanks again.
  • Yes! If you look at the header files included in ControlSuite, there is both SpiaRegs and SpibRegs. You can simply find/replace SpiaRegs with SpibRegs in your code.

    You will need to select the appropriate SPIB Mux options. Please look at the SPI user Guide (SPRUG71), as well as the device datasheet.

    -Mark
  • Thank you so much! That answers my questions.