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.

CC2640 SPI task in sensor controller

Other Parts Discussed in Thread: CC2640

Hi,

I am working on a CC2640 4x4 custom application. I am using BLE stack 2.2, TI RTOS 2.18, CCS 6.1.2,

sensor controller studio 1.3.0, XDS 200 debugger.

I am trying to create an SPI task using Sensor Controller. All I did from the SCS was to create a

SPI serial interface for one slave, use system CPU alert, RTC based execution scheduling and delay

insertion. I checked the balanced 1.1 MHz bit rate option. The slave datasheet says the max bitrate

it can handle is 1 MHz. Does this mean the sensor controller SPI is too fast to communicate with this

slave?

I was able to generate the code and see the memory usage displayed OK. I am able to connect to the

XDS 200 from sensor controller studio. When I test the task, I am probing the chip select and MOSI

signals on the scope. I am not seeing the chip select activate on the scope.

What might be going wrong in this step? I also created a main_tirtos.c and used this to add to the

simple_peripheral project. I will have more questions when I get past my first question.

Thank you,

Priya

Here is the initialization code:

fwScheduleTask(1);

Here is the execution code:

spiBegin(SPI_POL0_PHA1, AUXIO_SPI_CSN_ACS);

//Power reset

spiTx8bit(SPI_POL0_PHA1, 0xF0);

spiEnd(SPI_POL0_PHA1, AUXIO_SPI_CSN_ACS);

fwDelayUs(200, FW_DELAY_RANGE_200_US);

spiBegin(SPI_POL0_PHA1, AUXIO_SPI_CSN_ACS);

//Watchdog off

spiTx8bit(SPI_POL0_PHA1, 0x9E);

spiEnd(SPI_POL0_PHA1, AUXIO_SPI_CSN_ACS);

fwDelayUs(10, FW_DELAY_RANGE_10_US);

fwGenAlertInterrupt();

// Schedule the next execution

fwScheduleTask(1);