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: Variable from CCS to SCS

Part Number: CC2650


Hello,

I am currently working on a CC2650 project. I have some code in SCS and in CCS. As I currently understand it, when the SCS code executes it stores data in the shared RAM that the main CPU (code for which is in CCS) can pull from. I have used this process quite a bit using the scifTaskData object, and am successfully able to send data collected by the sensor controller, stored in the RAM, and sent by the main CPU over BLE.

However, I am hoping to implement a control variable in SCS that is defined by the code in CCS. Essentially, I want to implement a boolean variable that can be written to via BLE, and which is passed onto the sensor controller via the shared RAM, to allow for some control over whether I want a certain measurement to be taken or not. Essentially using the process I described above in reverse. I am having difficulty, however, setting up this process. Where should I define this variable, and how should I set up a service in order to write to this variable from a mobile application? Are there any tutorials on this or any code examples? I have tried looking through the documentation but am struggling to find the answer.

Any help on this is appreciated.

Kind Regards,

Pawan Ratra.

  • Hi Pawan,

    Have you tried using the input data structure located in the AUX SRAM (more information in the chapter "Data structure members" of the "Constants and Data Structure Panel" sectioon of the sensor controller studio help page?

    This data structure is expressly created for the MCU application to write data into, so that sensor controller tasks can access it. 

    You will access it from the MCU application as:

    scifTaskData.myTask.input.variableX = someValue;

    and from the sensor controller task as:

    input.variableX

    Let me know if it helps.

    Regards,

    Fausto