I have modified the ble_app_uart to start and stop advertise by receiving command from the uart port. If I don't delete the ble_advertising_on_ble_evt(p_ble_evt); in below function. The program will be corrupted after advertise timeout. Are there any potential problems to delete the ble_advertising_on_ble_evt(p_ble_evt); in below function.
static void ble_evt_dispatch(ble_evt_t * p_ble_evt)
{
ble_conn_params_on_ble_evt(p_ble_evt);
ble_nus_on_ble_evt(&m_nus, p_ble_evt);
on_ble_evt(p_ble_evt);
// ble_advertising_on_ble_evt(p_ble_evt);
bsp_btn_ble_on_ble_evt(p_ble_evt);
}