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

Crash enabling softdevice on Fanstel USB840F (based on nrf52840)

All examples included in nrf52SDK 15.2.0 when running on Fanstel USB840F which has a nrf52840 chip, using Segger Embedded Studio and one of PCA10056 or PCA10059.

Using nrf52DK with TagConnect cable attached to USB840F, I managed to debug the code and found the code crashes when calling:

ret_code = sd_softdevice_enable(&clock_lf_cfg, app_error_fault_handler);

included in "nrf_sdh.c" at line 214.

I report here the source for covenience:

 // Notify observers about starting SoftDevice enable process.
    sdh_state_observer_notify(NRF_SDH_EVT_STATE_ENABLE_PREPARE);

    nrf_clock_lf_cfg_t const clock_lf_cfg =
    {
        .source       = NRF_SDH_CLOCK_LF_SRC,
        .rc_ctiv      = NRF_SDH_CLOCK_LF_RC_CTIV,
        .rc_temp_ctiv = NRF_SDH_CLOCK_LF_RC_TEMP_CTIV,
        .accuracy     = NRF_SDH_CLOCK_LF_ACCURACY
    };

    CRITICAL_REGION_ENTER();
#ifdef ANT_LICENSE_KEY
    ret_code = sd_softdevice_enable(&clock_lf_cfg, app_error_fault_handler, ANT_LICENSE_KEY);
#else
    ret_code = sd_softdevice_enable(&clock_lf_cfg, app_error_fault_handler);
#endif
    m_nrf_sdh_enabled = (ret_code == NRF_SUCCESS);
    CRITICAL_REGION_EXIT();

    if (ret_code != NRF_SUCCESS)
    {
        return ret_code;
    }


    m_nrf_sdh_continue  = false;
    m_nrf_sdh_suspended = false;

What could be the issue?

Running the same examples on nrf52840 Dongle and nrf52840DK works well

Thanks in advance!

Parents
  • ret_code = sd_softdevice_enable(&clock_lf_cfg, app_error_fault_handler);

    So what value of ret_code are you getting?

    The whole point of having ret_code is that it tells you what the error was!

    Running the same examples on nrf52840 Dongle and nrf52840DK works well

    Is that loading the exact same binary, or are you building different configurations?

  • The whole point of having ret_code is that it tells you what the error was!

    The function doesn't even return. It hangs indefinitely!

    Is that loading the exact same binary, or are you building different configurations?

    I built using segger embedded studio using pca10056 configuration for nrd52840DK and pca10059 configuration for nrf52840dongle.

    Unfortunately configuration for Fansterl UDB840F is not included in nrf52DK, thus I tried flashing the two hex files for pca10056  and pca10059  to USB840F, but it doesn't work. 

Reply
  • The whole point of having ret_code is that it tells you what the error was!

    The function doesn't even return. It hangs indefinitely!

    Is that loading the exact same binary, or are you building different configurations?

    I built using segger embedded studio using pca10056 configuration for nrd52840DK and pca10059 configuration for nrf52840dongle.

    Unfortunately configuration for Fansterl UDB840F is not included in nrf52DK, thus I tried flashing the two hex files for pca10056  and pca10059  to USB840F, but it doesn't work. 

Children
Related