problem in stopping and strating advertisments multiple times

hello,

i have been using nrf52832 with sdk 15.2 , while different interupts occurs i have been changing the advertising bytes with different aid like this

 m_beacon_info[11] = 0x03; 

err_code = sd_ble_gap_adv_stop(m_adv_handle);
APP_ERROR_CHECK(err_code);
advertising_init();
advertising_start();

but in some rare condition two different interupts occurs at the same time so it stops advertisment two times at that time firmware goes to breakpoint is there any way to fix this like, cheak wheather advertisment is already stopped or not so i wont stop the advertisment when second interupt occurs i will wait for first process to get finished and then update the second one.

thanks and regards

manikandan v

Parents Reply Children
No Data
Related