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: McBSP in SPI, transfer longer than 32 bits

Part Number: TMS320F28379D

Hello all,

I have the following problem: I use the McBSP peripheral in SPI mode to access an ethercat board. (https://download.beckhoff.com/download/document/io/ethercat-development-products/ethercat_et1100_datasheet_v2i0.pdf)

For this I need to have transfers of over 32 bits, keeping the chip select active. (the first few bytes are address and command info, the latter are data which is read or written)

I have the McBSP running in SPI mode (clock stop, etc.) but I can only send a single word of either 8/12/16/20/24/32 bits. When I send more than 1 word in a transfer, I get additional cycles on the clock line.

For example: when I configure for 8 bits / 2 words, I get

- chip select goes low

- 8 clock cycles

- short pause

- 10 clock cycles

- chip select goes high

When I send more words I get additional bursts of 10 cycles. 

Question: Is it possible to send more than 1 word in clock stop/SPI mode on the McBSP??

Is there any other way than software control to get more than 32 bits in a single transfer?

Best regard,

Paul van der Hulst

  • Hi Paul,

    Thanks for getting in touch. This is a tricky problem with the McBSP. Are you unable to use the C28x SPI?

    One solution may be to use a GPIO to emulate the chip select line. Is the McBSP clocking still functioning properly for your SPI slave, or are they both causing issues?

    Regards,
    Kris
  • Hi Kris,

    I would have used the SPI if it was available, although I have had some disappointments with that also. 

    The clock is also causing trouble if I want to send more than one word (which is required for messages >32bits)

    Bit-banging the clock is not an option.

    I find no explanation on how clock-stop interoperates with multi-word transfers. Is there any hope of getting this to work (in hardware)?

    Best regards,

    Paul