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.

CCS/LAUNCHXL-CC26X2R1: Interrupts ti-rtos SPI semaphore

Part Number: LAUNCHXL-CC26X2R1
Other Parts Discussed in Thread: ADS1292R, SYSCONFIG

Tool/software: Code Composer Studio

Hello,

I'm working with the SoC CC26x2 and ti-rtos. I have 3 SPI sensors and i have one task to read data from these.

This task starts with a semaphore_pend for reading data from the sensors. Each sensor has an interrupt and this interrupt does a sempahore_post, then it enters to the task and it reads the corresponding sensors to the interrupts.

The problem is after a while i lost one sensor, and then the other one. Finally i just have one.

Do you know where could be the problem?

Thanks,

Best regards,

Sebastian  

  • Hi Sebastian,

    Please state which SDK version you are using, and provide code snippets of your code.

  • Hello Severin,

    I am using simplelink_cc13x2_26x2_sdk_3_20_00_68.

    I changed my program, i had created 4 tasks but now i only have one which manages the SPI communications.

    Now i do not lose the sensors but i am seeing something while the MCU reads data from a sensor, i send you an image

    the lecture SPI is interrupted, it is not normal because i only have one task. This lecture corresponds to the sensor ADS1292R (ECG). In the figure IRQ is the ADS1292R interrupt, we can see the CLK pin that does 5 lectures then it is interrupted and finally it does 4. But it is not always like this, sometimes it is not interrupted so it's clearly another task i am thinking, being that i only created this one.

    Thanks

    Best regards,

    Sebastian

  • Hi Sebastian, 

    Can you upgrade to the latest SDK (v3.40) and see if you have the same issue?

    Thanks, 
    Elin

  • Hello Elin,

    I upgraded to the latest SDK but i have some errors about the simple_peripheral task (I was using the example Simple peripheral).

    What would be the best choice for using the latest SDK, doing a new project with ? or there are a solution for the errors about the simple peripheral task?

    Thanks,

    Sebastian

  • Hi Sebastian,

    I don't understand what errors you are referring to but I'm guessing that you are getting SysConfig build errors when building the project from the new SDK. This is because the SDKs are connected to specific versions of CCS, so when you are using version 3.40 of the SDK, you also have to upgrade to CCS v9.3. 

    If this doesn't solve the problem, can you provide the build log (if you are getting build errors) or provide more details about the error?

    Sebastian21 said:
    What would be the best choice for using the latest SDK, doing a new project with

    It depends on what kind of application you are developing but if you want to use the device as a peripheral, I would recommend you to start with the simple_peripheral project. 

    Thanks, 
    Elin

  • Hello Elin,

    Thank you for your response. I installed CCS v9.3 and I imported the project simple_peripheral.

    I have redone the project and I have the same interruption of the picture when I do a SPI read of 9 registers.

    Do you know where could be the problem?

    Thanks,

    Best regards,

    Sebastian

  • Hello Elin,

    I resolved my Issue i configured the SPI bit rate faster to 4 MHz and it worked.

    It was simpler than it looked.

    I thank you for your help.

    Best regards,

    Sebastian

  • Hello,

    I resolved my issue but i would like to know why the SPI read is interrupted while the task has the highest priority.

    Thanks,

    Best regards,

    Sebastian

  • Hello,

    The SPI read interruption could be done by the iCall taks with priority 5?

    Thanks,

    Best regards,

    Sebastian

  • Hi,

    Can you precise the priority assigned to each one of your threads? Are you using the SPI in BLOCKING or CALLBACK mode?

    Regards,