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-CC1310: Comparator from TI-RTOS

Part Number: LAUNCHXL-CC1310


Tool/software: TI-RTOS

Hi,

  I'd like to use either comparator from TI-RTOS. As far as I can find in the drivers and on this forum I can only see examples using Sensor Controller. I want to use this comparator for one shot comparison controlled by application software.

Could anybody point to an example where we can use comparator from TI-RTOS.

Thanks in advance,

Vamsi

  • Hi,

    Sensor Controller Studio (SCS) is highly configurable based on the needs of your application.

    SCS generated code has a function that will allow you to software trigger an execution of an active task: scifSwTriggerExecutionCodeNbl.

    Please follow the instructions at

    and instead use the attached SCS project (which uses COMPB).

    To use one shot reading:

    scifSwTriggerExecutionCodeNbl(BV(SCIF_COMPBOUTPUT_TASK_ID));

    Semaphore_pend(...);

    compbVal = scifTaskData.COMPBoutput.output.compbVal;

    Ensure that the scTaskAlertCallback (which is triggered after the SC reads COMPB) should post to the semaphore.

    Regards,

    Toby

    PS: I have also included the code from my main task (in empty.c)

    compb one shot.zip