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.

C6748 SPI 26 bits transmission

Hi,

I am trying to implement a 26bit transfer on SPI1. I have been fiddling with interrupts, cshold, making the cs pins as GPIOs and even disabling and enabling the SPI module in order to try to do it. I have met with a few hiccups, whilst I can send a consistent 26bit SPI transfer, I can only use it once. If I try to change the data I am transmitting, the SPI will ignore it. Is there a solution to this? I know it is sort of a hack as the SPI is only meant to transfer 16bits maximum.

Regards,
Jerome Lieow 

  • Hi,

    Thanks for your post.

    As you said, SPI is only used to transfer 16 bits maximum and to set up an EDMA transfer to the SPI module in order to get a trigger on a GPIO pin, please refer to the following TI wiki.

    http://processors.wiki.ti.com/index.php/Configuring_GPIO_EDMA_Events

    Also, there are reference examples for C674x which are based on DSP/BIOS drivers:

    http://software-dl.ti.com/dsps/dsps_public_sw/psp/BIOSPSP/index.html

    A CSL package that  was generally supported on older devices consisted of register and functional CSL. So If you are looking for register CSL kind of examples, you can find that under ~\pspdrivers_xx_xx_xx\packages\ti\pspiom\cslr\evm674x\examples.

    There is a SPI example in the PSP package which configures the peripheral in master mode but you will need SPI in Slave mode to read data from the ADC.

    Thanks & regards,

    Sivaraj K

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.

    -------------------------------------------------------------------------------------------------------

  • Hi Sivaraj,

    I can make SPI, EDMA and GPIO work. What I am asking is whether SPI can be used to transmit 26 bits instead of the 16 bits. It seems weird that it is unable to since there is a section in the tech ref that specifically states that the register CSHOLD is used to de-assert the chip select in between SPI transmissions. However, it does not seem to de-assert and assert in regular intervals which messes up my transmission. Is there a way to make the Chip select de-assert and reassert in a consistent manner so that I can transmit 26bits via SPI?

    Regards,
    Jerome Lieow