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.

executing an event for a particular time + CC2530

Hello TI

I want my LED to be ON for say 3 minutes and then after it will go off. Now please guide me how to do that using OSAL timer.

regards

SS.

  • You can turn on LED and start a LEDOFF_EVT event to turn off LED 3 minutes later like the followings:

    HalLedSet ( HAL_LED_1, HAL_LED_MODE_ON );
    osal_start_timerEx( zclXXX_TaskID, LEDOFF_EVT, 180000);

    And you have to implement LEDOFF_EVT like the followings:

    if ( events & LEDOFF_EVT )
    {
    // Turn off LED here
    HalLedSet ( HAL_LED_4, HAL_LED_MODE_OFF );
    return ( events ^ LEDOFF_EVT );
    }