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/CC2642R: CC2642R SPI no callbacks when transaction bigger that 16 bytes

Part Number: CC2642R
Other Parts Discussed in Thread: CC2640

Tool/software: Code Composer Studio

Hey,

I'm using CC2642R , SPI Master .

I have problem with SPI callbacks , when transaction size smaller than 16 bytes i have SPI callback , but when transaction increases to 17 bytes and more , no callbacks after transaction .

I'm using simplelink_cc13x2_26x2_sdk_2_40_00_81 .

whats should I do ?

This is SPI driver definition:

const SPICC26X2DMA_HWAttrs spiCC26X2DMAHWAttrs[CC26X2R1_LAUNCHXL_SPICOUNT] = {
{
.baseAddr = SSI0_BASE,
.intNum = INT_SSI0_COMB,
.intPriority = ~0,
.swiPriority = 0,
.powerMngrId = PowerCC26XX_PERIPH_SSI0,
.defaultTxBufValue = 0xFF,
.rxChannelBitMask = 1<<UDMA_CHAN_SSI0_RX,
.txChannelBitMask = 1<<UDMA_CHAN_SSI0_TX,
.mosiPin = CC26X2R1_LAUNCHXL_SPI0_MOSI,
.misoPin = CC26X2R1_LAUNCHXL_SPI0_MISO,
.clkPin = CC26X2R1_LAUNCHXL_SPI0_CLK,
.csnPin = CC26X2R1_LAUNCHXL_SPI0_CSN,
.minDmaTransferSize = 10
},
{
.baseAddr = SSI1_BASE,
.intNum = INT_SSI1_COMB,
.intPriority = ~0,
.swiPriority = 0,
.powerMngrId = PowerCC26XX_PERIPH_SSI1,
.defaultTxBufValue = 0xFF,
.rxChannelBitMask = 1<<UDMA_CHAN_SSI1_RX,
.txChannelBitMask = 1<<UDMA_CHAN_SSI1_TX,
.mosiPin = CC26X2R1_LAUNCHXL_SPI1_MOSI,
.misoPin = CC26X2R1_LAUNCHXL_SPI1_MISO,
.clkPin = CC26X2R1_LAUNCHXL_SPI1_CLK,
.csnPin = CC26X2R1_LAUNCHXL_SPI1_CSN,
.minDmaTransferSize = 10
}
};

const SPI_Config SPI_config[CC26X2R1_LAUNCHXL_SPICOUNT] = {
{
.fxnTablePtr = &SPICC26X2DMA_fxnTable,
.object = &spiCC26X2DMAObjects[CC26X2R1_LAUNCHXL_SPI0],
.hwAttrs = &spiCC26X2DMAHWAttrs[CC26X2R1_LAUNCHXL_SPI0]
},
{
.fxnTablePtr = &SPICC26X2DMA_fxnTable,
.object = &spiCC26X2DMAObjects[CC26X2R1_LAUNCHXL_SPI1],
.hwAttrs = &spiCC26X2DMAHWAttrs[CC26X2R1_LAUNCHXL_SPI1]
},
};

 

Thanks .

  • Hady,

    First, you should use the latest SDK, v3.20.00.68.

    From the SPICC26X2DMA.h API page:

    SPI data frames can be any size from 4 to 16 bits. What is your datasize? If it is greater than 8 bits, the driver implementation will assume SPI_Transaction txBuf/rxBuf points to an array of 16-bit unint16_t elements.

    In terms of transfer size limit, "the UDMA controller only supports data transfers of up to 1024 data frames. A transfer with more than 1024 frames will be transmitted/received in multiple 1024 sized portions until all data has been transmitted/received. A data frame can be 4 to 16 bits in length."

    BR,

    Seong

  • Hey Seong,

    data size is 8 bits , and my transaction size is 248 bytes .

    I succeed to get callbacks before in CC2640, but when i moved to cc2642r callback stops.

    i need to try the new SDK V3.20.00.68 , maybe the problem comes from SDK i'm using .

    i will keep you updated .

    Thanks 

  • Hey  Seong, 

    I changed my txbuf & rxbuf type to unint16_t ... that solve the problem .

    that's worked on both SDK.

    Thanks a lot .