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.

Regarding CC2650 Launchpad ProjectZero with SPI

I am trying to add SPI to Project Zero project. I followed the developer's guide of  CC2640 and CC2650 SimpleLink™ to add a driver.

I have done the following steps:

add Board_SPI0_CSN pin to pin config table

modify        .csnPin= Board_SPI0_CSN

in projectzero.c file

#include <ti/drivers/SPI.h>

/* SPI driver handles */
static SPI_Handle spiHandle;
static SPI_Params spiParams;

in static void ProjectZero_init(void) function

  // ******************************************************************
  // SPI initialization
  // ******************************************************************
  Log_info0("SPI initialise start");
  SPI_Params_init(&spiParams);
  spiHandle=SPI_open(CC2650_LAUNCHXL_SPI0,&spiParams);
  Log_info0("SPI initialise done");

From my log:

[Fri Jun 03 15:58:10.509 2016] #000020 [ 0.021 ] INFO: (ProjectZero.c:538) SPI initialise start
[Fri Jun 03 15:58:10.509 2016] #000021 [ 0.021 ] SPI:(@40000000) CPU freq: 48000000; SPI freq to 1000000
[Fri Jun 03 15:58:10.529 2016] #000022 [ 0.021 ] SPI:(@40000000) opened
[Fri Jun 03 15:58:10.532 2016] #000023 [ 0.021 ] INFO: (ProjectZero.c:542) SPI initialise done
[Fri Jun 03 15:58:10.532 2016] #000024 [ 0.021 ] INFO: (ProjectZero.c:755) GAP is started. Our address: 0xB0B448CF6E04
[Fri Jun 03 15:58:10.547 2016] #000025 [ 0.021 ] INFO: (ProjectZero.c:760) Advertising
[Fri Jun 03 15:58:10.631 2016] #000026 [ 0.330 ] SPI:(@40000000) CPU freq: 48000000; SPI freq to 1000000
[Fri Jun 03 15:58:10.747 2016] #000027 [ 0.438 ] SPI:(@40000000) CPU freq: 48000000; SPI freq to 1000000
[Fri Jun 03 15:58:10.847 2016] #000028 [ 0.541 ] SPI:(@40000000) CPU freq: 48000000; SPI freq to 1000000
[Fri Jun 03 15:58:10.963 2016] #000029 [ 0.647 ] SPI:(@40000000) CPU freq: 48000000; SPI freq to 1000000
[Fri Jun 03 15:58:11.063 2016] #000030 [ 0.748 ] SPI:(@40000000) CPU freq: 48000000; SPI freq to 1000000
[Fri Jun 03 15:58:11.163 2016] #000031 [ 0.848 ] SPI:(@40000000) CPU freq: 48000000; SPI freq to 1000000
[Fri Jun 03 15:58:11.263 2016] #000032 [ 0.950 ] SPI:(@40000000) CPU freq: 48000000; SPI freq to 1000000
[Fri Jun 03 15:58:11.363 2016] #000033 [ 1.050 ] SPI:(@40000000) CPU freq: 48000000; SPI freq to 1000000
[Fri Jun 03 15:58:11.463 2016] #000034 [ 1.158 ] SPI:(@40000000) CPU freq: 48000000; SPI freq to 1000000
[Fri Jun 03 15:58:11.578 2016] #000035 [ 1.264 ] SPI:(@40000000) CPU freq: 48000000; SPI freq to 1000000
[Fri Jun 03 15:58:11.678 2016] #000036 [ 1.371 ] SPI:(@40000000) CPU freq: 48000000; SPI freq to 1000000
[Fri Jun 03 15:58:11.778 2016] #000037 [ 1.471 ] SPI:(@40000000) CPU freq: 48000000; SPI freq to 1000000
[Fri Jun 03 15:58:11.878 2016] #000038 [ 1.575 ] SPI:(@40000000) CPU freq: 48000000; SPI freq to 1000000
[Fri Jun 03 15:58:11.994 2016] #000039 [ 1.679 ] SPI:(@40000000) CPU freq: 48000000; SPI freq to 1000000
[Fri Jun 03 15:58:12.094 2016] #000040 [ 1.785 ] SPI:(@40000000) CPU freq: 48000000; SPI freq to 1000000
[Fri Jun 03 15:58:12.194 2016] #000041 [ 1.890 ] SPI:(@40000000) CPU freq: 48000000; SPI freq to 1000000
[Fri Jun 03 15:58:12.309 2016] #000042 [ 1.995 ] SPI:(@40000000) CPU freq: 48000000; SPI freq to 1000000
[Fri Jun 03 15:58:12.409 2016] #000043 [ 2.097 ] SPI:(@40000000) CPU freq: 48000000; SPI freq to 1000000

I noticed that SPI:(@40000000) CPU freq: 48000000; SPI freq to 1000000 keep on repeating is due to spiPostNotify function.

Then when I perform a simple SPI transfer:

            uint8 txbuf[]={0,1,2,3,4};
            uint8 rxbuf[5];
            SPI_Transaction spiTransaction;
            spiTransaction.arg=NULL;
            spiTransaction.count=5;
            spiTransaction.txBuf=txbuf;
            spiTransaction.rxBuf=rxbuf;
            SPI_transfer(spiHandle,&spiTransaction);

the launcher pad is not responding anymore even after I press the reset button.

Please give me some advice.

Thanks.