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

Encountering NRF_FAULT_ID_SDK_ERROR, error code 7 (INVALID_PARAM) when moving from nRF52-DK to BM832A module

Hello, we have developed an BLE application based on the ble_peripheral/ble_app_uart example on an nRF52-DK dev kit with an nrf52832.  It works great.

On our production board, we are using a BM832A module, which is a module that includes an nrf52832.  We can place the softdevice and our app on both the same way using both nRFgoStudio, and Keil -- no apparent differences.  However, whereas it runs great on the nRF52-DK (advertises, connects, etc), we get a pretty quick NRF_FAULT_ID_SDK_ERROR when we run on the BM832A module.  The error code is 7, and there is no filename or line number in the error info as decoded by app_error_fault_handler.

Any ideas about what we should look at?  What types of things cause this error?  It's surprising that it's an SDK error, that seems to counterindicate hardware.

Thanks!

  • A little more info... 

    the error is happening in ble_advertising_start, an INVALID_PARAM returned from sd_ble_gap_adv_set_configure.  

    My parameters appear to be:

    p_adv_handle = 0x00

    p_adv_data = "..\f\tNordic_UART", length=0x10

    p_adv_params = {peer_addr=0x0, interval=8000, duration=0, max_adv_events=0)

    Are any of these invalid?  Why would the target make a difference herE?

  • And a little more info...

    Looks like the problem is duration=0.  If I make this non-zero the call to  sd_ble_gap_adv_set_configure works.

    I see now at the link and excerpt below, that we needed to change the flags as well to make the duration 0.  Why is that?  What does BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE vs BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE do?

    ***

    devzone.nordicsemi.com/.../define-app_adv_duration-18000-or-0

    If you don't want your advertisements to time out, and your device to go to sleep, you can set the advertising duration (APP_ADV_DURATION) to 0. Note that you also need to change the advertising flag from BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC:MODE to BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE.

    In the ble_app_uart example, that means changing the line:

    init.advdata.flags              = BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE;

    to

    init.advdata.flags              = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;

    Note that when the advertisement never times out, the device will not go to sleep to conserve power. Except from this, there are no changes that I can think of.

  • riceman0 said:
    I see now at the link and excerpt below, that we needed to change the flags as well to make the duration 0.  Why is that?  What does BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE vs BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE do?

     From the BLUETOOTH CORE SPECIFICATION Version 5.2 | Vol 3, Part C page 1295

    The limited discoverable mode should be used by devices that need to bediscoverable only for a limited period of time, during temporary conditions, or for a specific event.

    BLUETOOTH CORE SPECIFICATION Version 5.2 | Vol 3, Part C page 1297

    The general discoverable mode shall be used by devices that need to be discoverable continuously or for no specific condition. Devices in the general discoverable mode will not be discovered by devices performing the limited inquiry procedure. General discoverable mode should not be used if it is known that the device performing discovery will be using thelimited inquiry procedure.

    So in short, if you want your Bluetooth Low Energy device to advertise with no timeout you need to set the advertising flag to BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE. If the advertising will timeout, you need to set the advertising flag to BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE.

    Best regards

    Bjørn

Related