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

HardFault on sd_ble_gap_device_name_set call on custom nrf51822 board

Hi,

I've developed an application and tested it on the evaluation kit. Now i'm trying to run it on a custom board with a nrf51822 chip on it. I've made modifications to exclude evaluation board specific code - removed any boards.h peripheral usage and changed the clock argument of SOFTDEVICE_HANDLER_INIT to the internal RC NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION enum.

Now when I debug the program(after the softdevice is programmed with nrfgo), it runs up to sd_ble_gap_device_name_set function call and then goes to hard fault handler. What could the problem be? The same code ran perfectly on a 10001 evaluation board.

The relevant gap parameter init snippet:

 uint32_t                err_code;
    ble_gap_conn_params_t   gap_conn_params;
    ble_gap_conn_sec_mode_t sec_mode;

    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&sec_mode);

    err_code = sd_ble_gap_device_name_set(&sec_mode, (const uint8_t *)DEVICE_NAME, strlen(DEVICE_NAME));
Parents Reply Children
No Data
Related