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.

CC3200 SPI transfer rate

Other Parts Discussed in Thread: CC3200, ENERGIA

Hello,

I want to ask what is the highest possible transfer rate between two CC3200 connected via SPI?


Currently I set up my SPI connection like this (basically taken from the example):

    MAP_SPIConfigSetExpClk(GSPI_BASE,MAP_PRCMPeripheralClockGet(PRCM_GSPI),
                     SPI_IF_BIT_RATE,SPI_MODE_MASTER,SPI_SUB_MODE_0,
                     (SPI_SW_CTRL_CS | (HW_CTRL for the slave)
                     SPI_4PIN_MODE |
                     SPI_TURBO_OFF |
                     SPI_CS_ACTIVEHIGH |
                     SPI_WL_8));

However, the highest SPI_IF_BIT_RATE that will work for me is 800.000.
In the sources for energia it is set to 4.000.000 and in example/common/utils_if.c in the SDK it is even set to 20,000,000.
When I try to set these values however, I can no longer correctly transfer data. It seems that interrupt SPI_INT_TX_EMPTY is either not raised or missed (the corresponding counter is never increased).

I test the connection by sending an array of 64K uint8_t elements to the slave and copy it from the slave's rx buffer to its tx_buffer. At speed 800.000 (I am not sure what unit. It is called bitrate, but most people seem to refer to it as frequency) this transfer always works, at the higher speeds it fails even for smaller buffers.

Can anyone think of a reason, why the higher speeds do not work?

Thank you very much for your time!

Severin

   

  • Ah, sorry the formatting of the first post seems to be messed up. Here is the Text, without the source code highlight:
    Hello,

    I want to ask what is the highest possible transfer rate between two CC3200 connected via SPI?


    Currently I set up my SPI connection like this (basically taken from the example):
    However, the highest SPI_IF_BIT_RATE that will work for me is 800.000.In the<a title=" sources for energia" href="github.com/.../SPI.cpp"> sources for energia</a> it is set to 4.000.000 and in example/common/utils_if.c in the SDK it is even set to 20,000,000.

    When I try to set these values however, I can no longer correctly transfer data. It seems that interrupt SPI_INT_TX_EMPTY is either not raised or missed (the corresponding counter is never increased).I test the connection by sending an array of 64K uint8_t elements to the slave and copy it from the slave's rx buffer to its tx_buffer. At speed 800.000 (I am not sure what unit. It is called bitrate, but most people seem to refer to it as frequency) this transfer always works, at the higher speeds it fails even for smaller buffers. Can anyone think of a reason, why the higher speeds do not work?

    Thank you very much for your time!

    Severin
  • Hi Severin,

    Let me check and get back to you.

    Thanks and Regards,
    Praveen
  • Hi Severin,

    Max SPI speed supported is 20 MHz. Please make sure that all your connections are firm and you are not using too long cable to interconnect the LPs.

    Thanks and Regards,
    Praveen
  • Hello Praveen!

    Thank you for the quick reply. So the maximum value for SPI_IF_BIT_RATE should be 20.000.000?
    What do you consider 'long'? My SPI connection cables are around 10cm long.

    I think my problem is, that I do not use DMA. I think the CPU cannot handle the huge number of interrupts at higher frequencies. Thus I will try to enable DMA and see if this solves my problem.

    Thank you!
    Severin
  • Hi Severin,

    Since you have the SPI + DMA setup working here : e2e.ti.com/.../399482

    I am closing this thread, if you have follow up queries please open a thread and add a link to this one for reference.

    Thanks and Regards,
    Praveen