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.

CC2652PSIP: CC2652PSIP on-line Adv RF power control

Part Number: CC2652PSIP

Hello,

My Simple_Peripheral - based project for the CC2652PSIP tries to control RF power for ODID Adv when it is running,. It is not an ISR:

void simple_peripheral_SetPower(void *pValue)
{

bStatus_t tmp_status = SUCCESS;

tmp_status = GapAdv_disable(advHandleLegacy);

Task_sleep(100);

tmp_status = GapAdv_setParam(advHandleLegacy, GAP_ADV_PARAM_TX_POWER, pValue);

Task_sleep(100);

tmp_status = GapAdv_enable(advHandleLegacy, GAP_ADV_ENABLE_OPTIONS_USE_MAX, 0);

Task_sleep(100);

}

The idea is to stop Bluetooth advs, adjust RF power and restart them again with new power.

The firmware freezes on the GapAdv_disable(advHandleLegacy), and doesn't return from this function. What can be wrong or what should be changed?

Thanks,

Alex