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

nRF52840 mesh SDK coexistence

Hi,

I have working firmware for nRF52832 dev kit based on mesh coexistence examples (Mesh SDK 2.2.0 + nRF5_SDK_15.0.0). I'm trying to port the same firmware on nRF52840 dev kit but there are no SDK coexistence examples provided for nRF52840 so I modified ble peripheral example from nRF5_SDK_15.0.0. If I don't initialize mesh everything else works fine, but I'm getting "ASSERTION FAILED at :0" when mesh stack is being initialized, in function mesh_config_backend_init(), line "NRF_MESH_ASSERT(p_entries != NULL);".

void mesh_config_backend_init(const mesh_config_entry_params_t * p_entries,
                              uint32_t entry_count,
                              const mesh_config_file_params_t * p_files,
                              uint32_t file_count,
                              mesh_config_backend_evt_cb_t evt_cb)
{
    NRF_MESH_ASSERT(p_entries != NULL);
    NRF_MESH_ASSERT(entry_count > 0ul);
    NRF_MESH_ASSERT(p_files != NULL);
    NRF_MESH_ASSERT(file_count > 0ul);

    m_power_down_time_us = 0;

    mp_files = p_files;
    m_file_count = file_count;
    mesh_config_backend_glue_init(evt_cb == NULL ? dummy_event : evt_cb);

    for (uint32_t itr = 0; itr < entry_count; itr++)
    {
        const mesh_config_file_params_t * p_file = file_get(p_entries[itr].p_id->file);
        NRF_MESH_ASSERT(p_file != NULL && p_file->p_backend_data != NULL);
        uint32_t size_guard = p_file->p_backend_data->size +
                mesh_config_record_size_calculate(p_entries[itr].entry_size) * p_entries[itr].max_count;
        NRF_MESH_ASSERT(size_guard <= UINT16_MAX);
        p_file->p_backend_data->size = size_guard;
        p_file->p_backend_data->entry_count += p_entries[itr].max_count;
    }

    /* Create files in increasing file ID order */
    const mesh_config_file_params_t * p_file = NULL;

    while ((p_file = next_file_get(p_file)) != NULL)
    {
        if (MESH_CONFIG_STRATEGY_NON_PERSISTENT != p_file->strategy)
        {
            NRF_MESH_ERROR_CHECK(mesh_config_backend_file_create(p_file->p_backend_data));
        }

        m_power_down_time_us += mesh_config_backend_file_power_down_time_get(p_file);
    }
}

Any idea what could be causing this? Are there any SDK coexistence examples for nRF52840?

Parents
  • Have you taken a look at the documentation provided here? There is similar documentation if you want to use mesh sdk v2.2.0 here. I do not believe there are any coexistance examples for the 52840 at the moment unfortunately. The documentation should provide enough info (theoretically) for you to achieve the same on the 52840. 

    Did the coexistence example work without any issues on the 52832 (i.e. I guess you did not receive the same assert on the coexist example, correct?). What changes did you make to port the 52832 to the 52840?

  • Mesh SDK 3.0.0 + SDK 15.2.0 same issue, getting NULL pointer for "p_entries" in mesh_config_backend_init();. Has mesh coexistence been tested with nRF52840 or just 52832?

  • As I mentioned in a previous comment, it seems that the mesh coexistence project has only been created for the 52832 for now.

    Which ble peripheral example did you test with from sdk 15.2.0? Have you tested the coexistence with a ble peripheral example (nRF5 SDK v15.2.0 & mesh sdk v3.0.0) first & then with your custom FW (based on nRF5 SDK v15.2.0) & then added the mesh functionality to that (mesh sdk v3.0.0)?

    Do you receive any warnings in your log such as "Insufficient RAM allocated for the softdevice. Change the RAM start location from ... to ..."? It may be that the RAM settings might need to be adjusted. Could you please upload your complete log to this case?

Reply
  • As I mentioned in a previous comment, it seems that the mesh coexistence project has only been created for the 52832 for now.

    Which ble peripheral example did you test with from sdk 15.2.0? Have you tested the coexistence with a ble peripheral example (nRF5 SDK v15.2.0 & mesh sdk v3.0.0) first & then with your custom FW (based on nRF5 SDK v15.2.0) & then added the mesh functionality to that (mesh sdk v3.0.0)?

    Do you receive any warnings in your log such as "Insufficient RAM allocated for the softdevice. Change the RAM start location from ... to ..."? It may be that the RAM settings might need to be adjusted. Could you please upload your complete log to this case?

Children
Related