Other Parts Discussed in Thread: ADS1220, CC2640
Hi,
I have been trying top interface ADS1220 with CC2640 by modifying Simple BLE Peripheral with help of SPI Master example.
But It seems I am unable to initialize SPI and connect to ADS1220 as DIO8, DIO9, DIO10 shows no signal in DSO.
static void SimplePeripheral_performPeriodicTask(void)
{
SPI_Handle handle;
SPI_Params params;
SPI_Transaction transaction;
uint8_t txBuf[] = {0xA1, 0xC0, 0xC0, 0x00} ; // Transmit buffer
uint8_t rxBuf[20]; // Receive buffer
// memset(txBuf, 0xFF, sizeof(txBuf));
// memset(rxBuf, 0xFF, sizeof(rxBuf));
// Init SPI and specify non-default parameters
SPI_Params_init(¶ms);
params.bitRate = 1000000;
params.frameFormat = SPI_POL1_PHA1;
params.mode = SPI_MASTER;
// Configure the transaction
transaction.count = sizeof(txBuf);
transaction.txBuf = txBuf;
transaction.rxBuf = rxBuf;
// Open the SPI and initiate the first transfer
handle = SPI_open(Board_SPI_MASTER, ¶ms);
SPI_transfer(handle, &transaction);
SimpleProfile_SetParameter(SIMPLEPROFILE_CHAR4, sizeof(uint8_t),
&rxBuf);
SPI_close(handle);
}