calling sd_ble_gap_whitelist_set crashes my application

working with a nrf52833, soft device 140.


I am trying to setup a whitelist with a known addresses before I start scanning.

I am calling the following code before my main while loop starts but after I enable the SD:

   ret_code_t err_code;
   ble_gap_addr_t whitelist_addrs[2] = {
      {.addr_type = BLE_GAP_ADDR_TYPE_PUBLIC, .addr = {0xE8, 0xEB, 0x1B, 0x93, 0xCD, 0xC2}},
      {.addr_type = BLE_GAP_ADDR_TYPE_PUBLIC, .addr = {0xC2, 0xCD, 0x93, 0x1B, 0xEB, 0xE8}}
  };

  uint32_t addr_count = sizeof(whitelist_addrs) / sizeof(ble_gap_addr_t);
  err_code = c(whitelist_addrs,addr_count );
   APP_ERROR_CHECK(err_code);
with this code my board stops working. after I call this while debugging my application stops functioning. the debugger stops at the following location and I do not get any diagnostics information in the debug termina.



if I sett the second parameter of sd_ble_gap_whitelist_set to 0 I get the "NRF_ERROR_DATA_SIZE" message
if I put an invalid address in the first parameter of sd_ble_gap_whitelist_set I get the "NRF_ERROR_INVALID_ADDR] "
any idea why this would crash my application? is there something that I have not configured?
Related