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.

[CC2650] SPI Example for Sensor Controller Studio

Other Parts Discussed in Thread: CC2650

Hello,

we are developing an application with the CC2650 and at the moment we are using the M3 for extracting data from our sensors (accelerometers) using SPI and the sensor controller for sampling an ADC sensor at 128 Hz.

In order to save power, we want to offload the SPI task to the sensor controller, is there a way for the sensor controller to use the hardware SPI or do we have to use the bit-banging code that is provided in the help section? Any example code for both implementations will be appreciated! 

Regards,

Sammy

  • It's bit-banged only for the Sensor Controller.

    There's an html file that came with Sensor controller Studio that has the commands:
    C:\Program Files (x86)\Texas Instruments\Sensor Controller Studio\resource_docs\spi_data_transfer.html

    A previous forum example of usage:
    // Read the accelerometer
    spiBegin(SPI_POL0_PHA0, AUXIO_SPI_CSN_ACCEL);
    spiTx8bit(SPI_POL0_PHA0, 0x42);
    spiRx16bit(SPI_POL0_PHA0; output.x);
    spiRx16bit(SPI_POL0_PHA0; output.y);
    spiRx16bit(SPI_POL0_PHA0; output.z);
    spiEnd(SPI_POL0_PHA0, AUXIO_SPI_CSN_ACCEL);