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.

LAUNCHXL-CC2640R2: Not using message queuing in a single TI-RTOS Task Application

Part Number: LAUNCHXL-CC2640R2

Hi,

   I would like to know what is the effect of not using message queuing in a single TI-RTOS Task Application. For example sensortag_io.c. When there is a characteristic change it will call this callback function below.

static void ioChangeCB(uint8_t paramID)
{
    /* Wake up the application thread */
    SensorTag_charValueChangeCB(SERVICE_ID_IO, paramID);    
}

The SensorTag_charValueChangeCB() will queue message then the main TI-RTOS Task will Process the App message, which will then call the SensorTagIO_processCharChangeEvt(uint8_t paramID) at sensortag_io.c

What if I call void SensorTagIO_processCharChangeEvt(uint8_t paramID) inside ioChangeCB() like this below. Doing so I did not use message queuing. Is there something wrong if I do not use message queuing at single TI-RTOS Task Application?

static void ioChangeCB(uint8_t paramID)
{
    /* Wake up the application thread */
    SensorTagIO_processCharChangeEvt(paramID);
}

- kel

  • Hello,

    Callbacks operate in a different (higher priority in this case) context so you would likely cause a real time issue with the protocol stack. Refer to the warnings about callback usage in the SW Developer's Guide.

    Best wishes