Part Number: CC2650MODA
Other Parts Discussed in Thread: CC2650
Tool/software: Code Composer Studio
Hello.
In my project, I receive data on bluetooth and send it to the master via the SPI interface.
How to start an interrupt to recieve/transmit data from the master.
SPI: Slave, POL0, PHA0;
Board: CC2650 LaunchPad, CC2650MODA
If you use PIN_registerIntCb(SPIHandle, &SPICallbackFxn)
There is a delay of 11 characters at a speed of 1MHz
PIN_Config SPIPinTable[] = {
IOID_11 | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_NEGEDGE,
PIN_TERMINATE
};
SPIHandle = PIN_open(&SPIPinState, SPIPinTable);
static void SPICallbackFxn(PIN_Handle handle, PIN_Id pinId)
{
bool transferOK = false;
if (!transmitting)
{
tx_string[0]='T'; tx_string[1]='e'; tx_string[2]='s'; tx_string[3]='t'; tx_string[4]='s'; tx_string[5]='t'; tx_string[6]='r';
//*******************************
SPI_trans.count = (uint8_t) strlen(tx_string); //
SPI_trans.txBuf = tx_string; //
SPI_trans.rxBuf = rx_string; //
transferOK = SPI_transfer(SPI_connetction, &SPI_trans);
}
}