This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

hello,on nef52832 sdk16.0 why Update broadcast content the program will go to NRF_BREAKPOINT_COND

nrf52832 sdk16.0

my program initialize as below:

  advertising_init(m_advertising_data_init_array,10);

  adv_scan_start(erase_bonds);

scan and advertising  is ok,but when  my  uart receives  messages,i  want Update broadcast data,i advertise this messages as below:

  sd_ble_gap_adv_stop(m_advertising.adv_handle);
  advertising_init(m_advertising_data_array,10);
  err_code = ble_advertising_start(&m_advertising, BLE_ADV_MODE_FAST);
  APP_ERROR_CHECK(err_code);

 but  the err_code =8,so  this APP_ERROR_CHECK(err_code)   make  program  goes to  NRF_BREAKPOINT_COND,

i  go to  ble_advertising_start() as below:

i find it goes to  return NRF_ERROR_INVALID_STATE;

  uint32_t ble_advertising_start(ble_advertising_t * const p_advertising,
  ble_adv_mode_t advertising_mode)
  {
   uint32_t ret;

    if (p_advertising->initialized == false)
    {
     return NRF_ERROR_INVALID_STATE;
    }

  }

it means Not initialized,but  i go to  advertising_init(m_advertising_data_array,10),in this ble_advertising_init(),

     it goes to 

      p_advertising->initialized = true;
      return ret;

it means initialized。I don't know what's wrong,i do the same on sdk 15.0,it works ok,My colleague  do the same on sdk16.0,it works ok too,

Related