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.

[C6727] SPI configured with dMAX

Other Parts Discussed in Thread: TMS320C6727B

I am using TMS320C6727B DSP. I want to use both SPI0 and SPI1 with dMAX for two different peripheral devices to transfer and get the data.

My questions are:

1) If the peripheral devices only supports 32bits tranfer over SPI and 6727 SPI at max supports 16bits trasnfer, is there any way to  have communication between them? (my limitation is the transfer should happen using dMAX)

2)Can I configure McASP as SPI in this case?Will it affect speed of transfer?

 

  • Sneha said:
    1) If the peripheral devices only supports 32bits tranfer over SPI and 6727 SPI at max supports 16bits trasnfer, is there any way to  have communication between them? (my limitation is the transfer should happen using dMAX)



    Because the SPI peripherals are only programmable to accept between 2 and 16 bits there is no way to connect it directly to a 32-bit device and function correctly. If the external device cannot be dropped down to output 16 bits you will need to select a different device or create some intermediate logic to act as basically a FIFO. Something like a CPLD or perhaps even a microcontroller could be used to read in the 32-bit SPI data, pack it down into 16-bit words and then transfer it to the DSP. Obviously this is not ideal, but this would allow the two devices to communicate.


    Sneha said:
    2)Can I configure McASP as SPI in this case?Will it affect speed of transfer?


    Unfortunately no, the McASP cannot be configured to function in a SPI compatible mode. The McBSP on some other devices has a SPI-like mode, but the McASP lacks this ability. This is most likely due to the fact that the chip already has an actual SPI port.

  • Why not do this:

    • Assert the chip select
    • Do two 16-bit transfers.
    • De-assert the chip select.

    From the perspective of the signals, I don't think you could tell the difference.  Just make sure to do the transfers in the right order.  If the slave is expecting MSB-first, then you would need to send the high 16-bits then the low 16-bits.

    Make sure you look at the errata, specifically Advisory 1.2.1 as there is an issue with the chip select in this scenario though it is easily worked around.

    Brad

  • Brad,

    That is a good point. Because the SPI port does not need to worry about 'frame syncs' as our other serial ports do it would see the 32-bit data simply as two separate 16-bit words. But once the data is in the system's memory it can be accessed as 32-bit data again.

  • Hi TimHarron,

    I wanted information about dMAX present as part of C6727. Are there any dMAX APIs present for DMA transfers, Please share the link of the APIs and procedure to configure and do the DMA Transfer using dMAX on CCSv3.3.

    We have C64x+ codec with ACPY3/DMAN3 interface, now to port on C6727 and use dMAX for DMA transfers what are the things to be taken care and how much Performance can be improved by using dMAX H/W instead of ACPY3/DMAN3.

    Also, can you provide your expert estimate how much time it takes to change one DMA using dMAX by configuring and running using CCS? 

    Regards

    Deepak