mpls_init hang, suspect infinite loop in nordic proprietary code

NCS 2.8

NRF52840

Sysbuild with MCUBOOT

LFCLK in Synth mode

CONFIG_BT=y
CONFIG_BT_LL_SOFTDEVICE=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_BROADCASTER=y

CONFIG_BT_CTLR=y
CONFIG_BT_HCI=y
CONFIG_BT_SMP=y

Previously functioning hardware, has now started hanging.  In the debugger I find the hang occurs within mpsl_init(..)    on line 395 on mpsl_init.c.  The hang is specifically within a obfuscated name sym_GYXW4XY25R4ELPOOTEBFKAUAI3X7A5AGZZV7OTI.

A wild guess on my part is that perhaps this code is waiting for HFCLK to start.  Looking at the registers the CLOCK module indicates the LF clock is running in SYNC mode and HF clock is in RC mode.

1) Init functions should not hang.  They should indicate a failure and allow system to continue.

2) Since this code is obfuscated, I'm completely blind to what might be causing the issue. 

Parents Reply
  • Hi,

     

    I agree that firmware shall not hang. I will bring this up with the softdevice/mpsl team.

    Anthony Ambuehl said:
    The board is extremely small and observing the high frequency crystals on any board is difficult. 

    Run this in firmware to check your clock connection:

    NRF_CLOCK->TASKS_HFCLKSTART = 1;
    NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;
    while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0);

    When testing, try to use "CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y" to enable the internal 32k RC oscillator.

     

    Kind regards,

    Håkon

Children
No Data
Related