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

APP_ERROR_CHECK errors

Hello!

I have been working on a code using ble_app_blinky and try to insert whitelist on it using ble_app_hids_keyboard as reference. After the APP_ERROR_CHECK i get a NRF_BREAKPOINT_COND.

ret = pm_whitelist_set(m_whitelist_peers, m_whitelist_peer_cnt);
APP_ERROR_CHECK(ret);

The app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info) indicates the id=0x00004001, pc=0x0000000 and info=0x2000ff14. Could anyone explain me what this means? Anywhere i could check what the different errors mean so i don´t have to bother you all the next time I have another issue with APP_ERROR_CHECK?

Thank you in advance.

SDK15, NRF52832, SES.

EDIT: I tried to add (inserted code) in the advertising_init function and i get exactly the same problem.

 

    ble_gap_adv_params_t adv_params;

    // Set advertising parameters.
    memset(&adv_params, 0, sizeof(adv_params));

    adv_params.primary_phy     = BLE_GAP_PHY_1MBPS;
    adv_params.duration        = APP_ADV_DURATION;
    adv_params.properties.type = BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED;
    adv_params.p_peer_addr     = NULL;
    adv_params.filter_policy   = BLE_GAP_ADV_FP_ANY;
    adv_params.interval        = APP_ADV_INTERVAL;

    err_code = sd_ble_gap_adv_set_configure(&m_adv_handle, &m_adv_data, &adv_params);
    APP_ERROR_CHECK(err_code);

Parents
  • UPDATE:
    Doing some tests: 

    ret_code_t pm_whitelist_set(pm_peer_id_t const * p_peers,
                                uint32_t             peer_cnt)
    {
        VERIFY_MODULE_INITIALIZED();
        return im_whitelist_set(p_peers, peer_cnt);
    }

    in my custom code the last line in that code is never executed and it goes directly to to APP_ERROR_CHECK

  • OKay, so its pm_whitelist_set that returns an error code that is not NRF_SUCCESS. Looking at the VERIFY_MODULE_INITIALIZED macro you'll see that it will return NRF_ERROR_INVALID_STATE if the module, i.e. Peer Manager is not initialized. 

    VERIFY_MODULE_INITIALIZED() VERIFY_TRUE((MODULE_INITIALIZED), NRF_ERROR_INVALID_STATE)

    Have you called pm_init() which sets the m_module_initialized flag in pper_manager.c to true?

    Best regards

    Bjørn 

Reply
  • OKay, so its pm_whitelist_set that returns an error code that is not NRF_SUCCESS. Looking at the VERIFY_MODULE_INITIALIZED macro you'll see that it will return NRF_ERROR_INVALID_STATE if the module, i.e. Peer Manager is not initialized. 

    VERIFY_MODULE_INITIALIZED() VERIFY_TRUE((MODULE_INITIALIZED), NRF_ERROR_INVALID_STATE)

    Have you called pm_init() which sets the m_module_initialized flag in pper_manager.c to true?

    Best regards

    Bjørn 

Children
Related