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.

RTOS/LAUNCHXL-CC2650: SPI_read in callback mode recieves 0's always.

Part Number: LAUNCHXL-CC2650
Other Parts Discussed in Thread: ADS1198

Tool/software: TI-RTOS

Hi,

I am able to initialize ADS1198 using SPI in blocking mode also I am reading correct register values.

Now in order to read the ECG data I need to do it in callback mode. But the problem is I am getting 0's always. Is there something else I need to consider.

I have defined my function as extern as per this thread: 

But it did not work. SPI_read function is in the same file as callback function.

Thank you,

Bharath

  • Hi Bharath,

    can you measure SCLK/SDO/SDI from your chip? And most important CS?
    If CS is not going low and always HIGH you will get 0 values.

    You are right about reading it in callback function otherwise it wont work onc CC26xx.

    I think for you the easy way to test is writing to a register from ADS and reading it back if the values are the same then your SPI is working.
    You can do this also on callback function of yours or make a clock that fires a event and in this event you can read and write to SPI.

    Best regards,

    Michael
  • Thanks a lot Michael.
    My problem was in CS pin. I was not making it low before SPI_read function. Now I am getting proper values.

    Thank you,
    Bharath