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: How to add SPI driver to SimplePeripheral Example?

Part Number: CC2650
Other Parts Discussed in Thread: CC2640

Hi,

I want to add  SPI driver to the SimplePeripheral example given in the BLE stack,

tried ' #include <ti/drivers/SPI.h>' in the main file but not able to see the SPI(SSI) registers while debugging.

The board has to be interfaced with an OLED that work on SPI, how can I do this in CC2650 Launchpad?

Regards,

Joe

  • Hi ArunJ JoeC
    SPI.h use the function pointer. Its pointer is mapped to the functions in SPICC26XXDMA.c
    You can see more details with 6.5.2 in C:\ti\simplelink\ble_sdk_2_02_01_18\docs\SWRU393_CC2640_BLE_Software_Developer's_Guide.pdf
  • Hi,
    I had gone through these documents already and have successfully implemented the SPI .
    Could you kindly help me with the procedure of adding a driver as this was done in Keil by adding the
    driver files to the project ,including the source directory link,and by adding the corresponding header files.
    In TI RTOS ,I cannot see a driver source file added to the project ,why is it so?

    Regards,
    Joe
  • Hi ArunJ JoeC,
    Link of TI is complex. Because they use the function pointer for API of lib. So you have to try to find the source code.
    You can try to use ctrl+shift+f to find the functions and add this source file into the project. 

    Example: SPI.c is source code of SPI.h header, but the functions in the SPI.c will link to the functions of SPICC26XXDMA.c

    You need to add file SPICC26XXDMA.c to debug the low layer of HAL. 

  • Hi,
    Hi as you said there is link between the files; for example,' void I2CCC26XX_init(I2C_Handle handle)' function is in I2CC26xx.c and in ' void I2C_init(void)' what is the use of this 2 initialization function? and what is the use of the C26XX.c driver files(why is it made seperately)?

    Regards,
    Joe
  • Hi ArunJ JoeC,
    You only need use I2C_init. I2C_init is mapped to I2CCC26XX_init.