CC1310: Is it possible to configure manual control on the SPI0_CSN pin in the CC1310 SPI_Master example?

Part Number: CC1310

Tool/software:

Is it possible to configure manual control on the SPI0_CSN pin in the SPI_Master example in CC1310 SDK v4.20.02.07?

I am working with an SPI device in slave mode that requires SPI0_CSN pin assertion, which is not compatible with the default configuration.

What should I do to give SPI0_CSN manual control and implement it in my application?

Thank you in advance.

  • Hi

    You can set the CSn pin as unassigned in CC1310_LAUNCHXL.c and then control it (or another pin) from the application instead:

    const SPICC26XXDMA_HWAttrsV1 spiCC26XXDMAHWAttrs[CC1310_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            = CC1310_LAUNCHXL_SPI0_MOSI,
            .misoPin            = CC1310_LAUNCHXL_SPI0_MISO,
            .clkPin             = CC1310_LAUNCHXL_SPI0_CLK,
            .csnPin             = PIN_UNASSIGNED,//CC1310_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            = CC1310_LAUNCHXL_SPI1_MOSI,
            .misoPin            = CC1310_LAUNCHXL_SPI1_MISO,
            .clkPin             = CC1310_LAUNCHXL_SPI1_CLK,
            .csnPin             = PIN_UNASSIGNED,//CC1310_LAUNCHXL_SPI1_CSN,
            .minDmaTransferSize = 10
        }
    };

    BR

    Siri