SWRA578B October 2017 – April 2020 CC1312PSIP , CC1312R , CC1314R10 , CC1352P , CC1352P7 , CC1352R , CC2620 , CC2630 , CC2640 , CC2640R2F-Q1 , CC2642R , CC2642R-Q1 , CC2650MODA , CC2652P , CC2652R , CC2652R7 , CC2652RB , CC2652RSIP
The SPI transfer example is created in the following way:
fwScheduleTask(1);
// SPI Data Transfer
spiCfg(SPI_POL0_PHA0,2); // 1MHz for Low-Power mode
//spiCfg(SPI_POL0_PHA0,6); // 4MHz for Active mode
spiBegin(AUXIO_SPI_CSN_CHIPSELECT);
spiTx8bit(0x54); // T
spiTx8bit(0x65); // e
spiTx8bit(0x78); // x
spiTx8bit(0x61); // a
spiTx8bit(0x73); // s
spiTx8bit(0x20); //
spiTx8bit(0x49); // I
spiTx8bit(0x6E); // n
spiTx8bit(0x73); // s
spiTx8bit(0x74); // t
spiTx8bit(0x72); // r
spiTx8bit(0x75); // u
spiTx8bit(0x6D); // m
spiTx8bit(0x65); // e
spiTx8bit(0x6E); // n
spiTx8bit(0x74); // t
spiTx8bit(0x73); // s
spiTx8bit(0x21); // !
spiEnd(AUXIO_SPI_CSN_CHIPSELECT);
fwScheduleTask(1);
/* TI-RTOS Header files */
#include <xdc/std.h>
#include <ti/sysbios/BIOS.h>
/* Example/Board Header files */
#include "ti_drivers_config.h"
#include "scif.h"
#define BV(x) (1 << (x))
/* ======== main ======== */
int main(void)
{
Board_initGeneral();
// Initialize the Sensor Controller
scifOsalInit();
scifInit(&scifDriverSetup);
// Set the Sensor Controller task tick interval to 0.1 second
// This variable controls how often the wakeup is triggered
uint32_t rtc_Hz = 10; // 10 Hz RTC ticks
scifStartRtcTicksNow(0x00010000 / rtc_Hz);
// Start Sensor Controller task
scifStartTasksNbl(BV(SCIF_SPI_TASK_ID));
/* Start kernel */
BIOS_start();
return (0);
}