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