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.

CC2640R2L:Issue about SPI Master transfer size limit.

Part Number: CC2640R2L
Other Parts Discussed in Thread: CC2642R

Hi team,

I am developing a Bluetooth addressable rgb ribbon controller using the CC2640R2L.

I'm using SPI Master to send the bytes to a driver that controls the leds

8 bytes for red
8 bytes for green
8 bytes for blue
In total there are 24 bytes for the first driver to recognize the color and turn on the LED
If I send a total of 48 bytes in a row, it takes the first 24 bytes and passes the rest to the second driver and so on
successively

For the drivers to activate the leds it has to stay more than 280μs in the low signal

 

To send the Bytes I need to follow the following times:

Data transfer time Code
T0H     code 0, high voltage time           220ns ~ 380ns
T0L      code 0, low  voltage time           580ns ~ 1us

T1H     code 1, high voltage time           580ns ~ 1us
T1L      code 1, low  voltage time           580ns ~ 1us

RES     Frame unit, low voltage time      >280μs

I need to connect 300 drivers that in total are 7200 bytes, but when the size of the SPI exceeds 1024 bytes it has a pause period and this period is making a difference in the communication.

Is there any way to send 7200 bytes straight through without these pauses?

  • Hi,

    Thank you for reaching out.

    May I kindly ask you to re-write your message in English so our engineers can comment?

    Best regards,

  • Hi,

    The way you are using the SPI driver is not totally standard. However, you should manage to achieve your requirement by setting the SPI driver in callback mode and enqueuing the next SPI operation within the write callback. 

    For information, I have worked on a personal project to drive this kind of LEDs with a CC2642R. The solution I have implemented uses the Sensor Controller (not available on the device you are using). You may want to have a look at it: https://github.com/ClementINSA/NeoPixel_CC13x2_CC26x2 (Note: this is personal project not owned nor supported by TI).

    I hope this will help,

    Best regards,

  • From what I've seen, these pauses occur because of the UDMA limitation

    Is there any way to remove UDMA and leave running only the SPI?

    Or any way to manipulate the registers to increase the limit size or reduce this pause time?

  • Hi,

    The SPI driver is configured to use the UDMA. This cannot be changed unless the driver is completely re-written.

    You are correct to say the UDMA cannot transfer more than 1024 bytes at the time, however, if the next UDMA transfer occurs before the SPI has consumed all the data, no pause should occur.

    May I kindly ask if you have tested the suggestion I have made before? "You should manage to achieve your requirement by setting the SPI driver in callback mode and enqueuing the next SPI operation within the write callback."
    What was the result?

    Best regards,