Can't run Qorvo DWM3000EVB Nearby Interaction software on nRF52840-DK

Dear all,

I'm trying to develop Apple Nearby Interaction with nRF52840-DK using a DWM3000EVB. I'm using the software provided by Qorvo which is compatible and tested on nRFSDK 16.

Using SEGGER Embedded Studio 6.30 I managed to build the code (despite the well known SEGGER_RTT_Syscalls_SES.c bug ) and the code seems to build.

When I run the code, I get to to 

int main(void)
{
    // Initialize modules.
    log_init();
    clock_init();

    // Activate deep sleep mode.
    SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;

    ble_init((char*)BoardName);

and the code stops at log_init(). Subsequently when I click Continue I get the error.
app: ERROR 7 [NRF_ERROR_INVALID_PARAM] at /Users/uwb.positioning/Downloads/Qorvo_Apple_Nearby_Interaction_Beta_release_1.0-2.0-1/Sources/Accessory/Qorvo_Apple_Nearby_Interaction_1.0.0/Sources/Qorvo/Qorvo_Apple_Nearby_Interaction_beta/Src/Comm/ble/ble.c:187
PC at: 0x00030739
app: End of error report

I managed to trace back the error to ble.c, specifically the function:

/**@brief Function for the GAP initialization.
 *
 * @details This function sets up all the necessary GAP (Generic Access Profile) parameters of the
 *          device including the device name, appearance, and the preferred connection parameters.
 */
static void gap_params_init(char *gap_name)
{
    static ret_code_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 *)gap_name,
                                          strlen(gap_name));
    APP_ERROR_CHECK(err_code);

    err_code = sd_ble_gap_appearance_set(BLE_APPEARANCE_HEART_RATE_SENSOR_HEART_RATE_BELT);
    APP_ERROR_CHECK(err_code);

    memset(&gap_conn_params, 0, sizeof(gap_conn_params));

    gap_conn_params.min_conn_interval = MIN_CONN_INTERVAL;
    gap_conn_params.max_conn_interval = MAX_CONN_INTERVAL;
    gap_conn_params.slave_latency     = SLAVE_LATENCY;
    gap_conn_params.conn_sup_timeout  = CONN_SUP_TIMEOUT;

    err_code = sd_ble_gap_ppcp_set(&gap_conn_params);
    APP_ERROR_CHECK(err_code);
}

How come the BLE gets the wrong gap parameters? Can someone help me through it.

The NearbyInteraction precompiled .hex file for nRF52840 works well, but I would like to implement my own logic on board.

Thank you in advance for your help

  • Hi,

    I'm using the software provided by Qorvo which is compatible and tested on nRFSDK 16.

    First of all though, I would consider using Segger Embedded Studio 4.18 to start with, as that is the version used for the release testing of SDK 16, just to keep the number of unknowns lower. Then you can migrate at a later point.

    and the code stops at log_init(). Subsequently when I click Continue I get the error.

    I do not have the source code you are using so I cannot say much without more information. Which function call returns the error (NRF_ERROR_INVALID_PARAM) that you see on line 187 in Qorvo_Apple_Nearby_Interaction_beta/Src/Comm/ble/ble.c? (there are 3 APP_ERROR_CHECK's in the code snippet you posted, so I don't know which of them it is). Can you also show the parameter values you use?

  • Segger Embedded Studio 4.18

    I asked on the Qorvo Forum and they told me to roll back to SES version 5.60a. I did that and the problem disappeared. Thank you, you can close the topic!

Related