Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Using Coded PHY in the nRF5SDK+SES development environment

I'm currently using firmware advertising/scanning with 1M PHY, but I'd like to use Coded PHY instead.
I tried changing the advertising parameters as shown below, based on other Q&A, but I get the error "NRF_ERROR_INVALID_PARAM" at the sd_ble_gap_adv_set_configure(&m_sd_adv_handle, &m_adv_data, &m_sd_adv_params) part.
I'm a beginner developer, so could you help me find a solution?
Thank you.

ble_gap_adv_params_t m_sd_adv_params;

    m_sd_adv_params.primary_phy     = BLE_GAP_PHY_CODED;
    m_sd_adv_params.properties.type = BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED;
    m_sd_adv_params.p_peer_addr     = NULL; 
    m_sd_adv_params.filter_policy   = BLE_GAP_ADV_FP_ANY;
    m_sd_adv_params.interval        = advertising_frequency;
    m_sd_adv_params.duration        = 0;       

Related