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.

CCS/CC2640R2F: Dual SPI transfer at the same clocks fragmented

Part Number: CC2640R2F


Tool/software: Code Composer Studio

Hey, 

I'm using 2 SPI's , each spi transaction works fine tell SPI's transactions works at the same time, both SPI's clock fragmented (see attached picture )

(BLUE-clock of SPI1, RED clock od SPI2)

Thanks

  • Hello,

    Can you clarify if you are attempting use the SSI peripherals or the sensor controller?  Do you have any example code you can share so I can recreate the issue?

    Thanks,
    Chris

  • Hey ,

    thanks for your response ,

    This is spi definition 

    #include <ti/drivers/SPI.h>
    #include <ti/drivers/spi/SPICC26XXDMA.h>

    SPICC26XXDMA_Object spiCC26XXDMAObjects[CC2640R2_SPICOUNT];

    const SPICC26XXDMA_HWAttrsV1 spiCC26XXDMAHWAttrs[CC2640R2_SPICOUNT] = {
    {//slave
    .baseAddr = SSI0_BASE,
    .intNum = INT_SSI0_COMB,
    .intPriority = ~0,
    .swiPriority = 0,
    .powerMngrId = PowerCC26XX_PERIPH_SSI0,
    .defaultTxBufValue = 0,
    .rxChannelBitMask = 1<<UDMA_CHAN_SSI0_RX,
    .txChannelBitMask = 1<<UDMA_CHAN_SSI0_TX,
    .mosiPin = _SPI1_MOSI,
    .misoPin = _SPI1_MISO,
    .clkPin = _SPI1_SCLK,
    .csnPin = PIN_UNASSIGNED
    },
    {master

    .baseAddr = SSI1_BASE,
    .intNum = INT_SSI1_COMB,
    .intPriority = ~0,
    .swiPriority = 0,
    .powerMngrId = PowerCC26XX_PERIPH_SSI1,
    .defaultTxBufValue = 0,
    .rxChannelBitMask = 1<<UDMA_CHAN_SSI1_RX,
    .txChannelBitMask = 1<<UDMA_CHAN_SSI1_TX,
    .mosiPin = _SPI2_MOSI,
    .misoPin = _SPI2_MISO,
    .clkPin = _SPI2_SCLK,
    .csnPin = PIN_UNASSIGNED
    }
    };

    const SPI_Config SPI_config[CC2640R2_SPICOUNT] = {
    {
    .fxnTablePtr = &SPICC26XXDMA_fxnTable,
    .object = &spiCC26XXDMAObjects[CC2640R2_SPI0],
    .hwAttrs = &spiCC26XXDMAHWAttrs[CC2640R2_SPI0]
    },
    {
    .fxnTablePtr = &SPICC26XXDMA_fxnTable,
    .object = &spiCC26XXDMAObjects[CC2640R2_SPI1],
    .hwAttrs = &spiCC26XXDMAHWAttrs[CC2640R2_SPI1]
    },
    };

    SPI master and slave size =8 , both in mode callback , both in mode 3 ( PHA1POL1) ,both in callback .
    spi master transaction 70, abd slave 1000,

    master transaction each 250 microsecinds and slave transaction each 6 milliseconds .

    both SPI's work fine separately .

    Thanks 

  • What are you settings in the CC2640R2_LAUNCHXL.h ?

    /* SPI Board */
    #define CC2640R2_LAUNCHXL_SPI0_MISO             IOID_8          /* RF1.20 */
    #define CC2640R2_LAUNCHXL_SPI0_MOSI             IOID_9          /* RF1.18 */
    #define CC2640R2_LAUNCHXL_SPI0_CLK              IOID_10         /* RF1.16 */
    #define CC2640R2_LAUNCHXL_SPI0_CSN              IOID_11
    #define CC2640R2_LAUNCHXL_SPI1_MISO             PIN_UNASSIGNED
    #define CC2640R2_LAUNCHXL_SPI1_MOSI             PIN_UNASSIGNED
    #define CC2640R2_LAUNCHXL_SPI1_CLK              PIN_UNASSIGNED
    #define CC2640R2_LAUNCHXL_SPI1_CSN              PIN_UNASSIGNED

    Regards,

    Chris

  • I have not had success in recreating the issue.

    Please see the attached project.  I am using the launchpad.dualSPI.zip

    Regards,

    Chris

  • Hey,

    Thanks for your code example .

    I'm using simplelink_cc2640r2_sdk_1_40_00_45 and the SPI driver looks different .

    I thinks changing the simple link version should solve the issue .

    Thanks a lot , i need to check this and i will keep you updated .