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: Could not get SPI to work and question about SDK and CCS versions and examples

Part Number: CC2650
Other Parts Discussed in Thread: CC2642R, CC2640R2F

Hello,

I am working with the CC2650F128 microcontroller on a custom board. My goal is to communicate via SPI with an ADC on this board and send the data over BLE.

I’ve installed ble_sdk_2_02_01_18 and simplelink academy 1.11.

I am working in CCS 6.20 as it is suggested in the sdk release notes, as with CCS 11.1 I was not able to compile, for example, simplelink 1.11’s project_zero.

I am currently working on a copy of project zero, removing project_zero.c, .h and using empty.c from C:\ti\tirtos_cc13xx_cc26xx_2_20_01_08\examples\TI\CC2650_LAUNCHXL\empty as starting place.

This is the code I’m using inside a task, I’ve based this code on the spi.h header comments.

SPI_Handle spi_handle;
SPI_Params spi_params;
SPI_Transaction spi_transaction;

SPI_init();

SPI_Params_init(&spi_params);
spi_params.transferMode = SPI_MODE_BLOCKING;
spi_params.mode = SPI_MASTER;
spi_params.bitRate = 1000000;
spi_params.dataSize = 8;
spi_params.frameFormat = SPI_POL0_PHA1;
spi_params.transferCallbackFxn = NULL;


spi_handle = SPI_open(Board_SPI0, &spi_params);
if (!spi_handle)
{
    Log_info0("SPI did not open");
}

The spi_handle returns null. I’ve been stepping through the code with the debugger through the file “SPICC26XXDMA.c” and it seems that it returns NULL because "Could not allocate SPI pins, already in use."

The logs in said file do not show up in the terminal, while calling the logging functions (Log_info, Log_warning…) from the task in empty.c do result in terminal output.

Why do logs in “SPICC26XXDMA.c” don’t show? And any pointers on how to get SPI to work?

On another note:

I’ve been going around in circles with this microcontroller for a while. I’m not sure about which tools to use, where is the documentation and where are the examples. I’ve been browsing the Developers manual and the TI-RTOS manual, also the Simplelink 1.11 pages and the forums.

Examples mentioned in forums, regarding drivers and such (for example i2ctmp007.c) are nowhere to be found and there are constant references to the processors wiki, which is no longer active. The resource explorer hasn’t been of much help.

So, on a broader sense:

Are the sdk and CCS versions that I’m using adequate, should I use others? (ble_sdk_2_02_01_18 and simplelink academy 1.11, CCS 6.20)

Are there any further examples other than those included in the ble sdk and simplelink installation directories, and if so, where can I find then?

Any help or references is appreciated.

Thanks.