Assertion Failure in mpsl_init.c on nRF54L15 – MPSL ASSERT: 1, 1385

Description:

We are using nRF54L15 with NCS v3.0.0, and the following clock configuration:

CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_50PPM=y

Our application only enables Bluetooth and sends advertisement data.
This assertion failure does not occur on every power-on, but it happens frequently during startup.
We are encountering an assertion failure during initialization of the MPSL module using the nRF54L15. The error message is as follows:

ASSERTION FAIL [0] @ WEST_TOPDIR/extern/ncs/nrf/subsys/mpsl/init/mpsl_init.c:307 MPSL ASSERT: 1, 1385
After enabling the following configuration, the issue appears to be resolved:

CONFIG_MPSL_USE_EXTERNAL_CLOCK_CONTROL=y

Questions:

  1. What is the root cause of this assertion failure?

  2. Is CONFIG_MPSL_USE_EXTERNAL_CLOCK_CONTROL=y the correct and recommended solution for this issue on nRF54L15?

  3. Are there any side effects or considerations when using external clock control in this context?

We’d appreciate your support on this issue.

BR,

Angus

Parents
  • Hello Angus,

    With a nRF54L15 DK, the Kconfig you listed are enabled by default, and I cannot reproduce the problem.

    Could you please let me know whether this happened on a custom hardware, or on a nRF54L15 DK?

    If you are using a custom hardware, could you confirm that your 32kHz external crystal accuracy is actually 50ppm?

    Best regards,

    Hieu

  • Thank you for your response.

    Yes, this issue occurs on our custom hardware, not on the nRF54L15 DK.
    According to our hardware team, the 32.768 kHz crystal we’re using has a specified frequency accuracy of 20 ppm.
    However, we currently do not have actual measurement data from the board.

    Could you kindly help us clarify the following points, to better understand the root cause and proper handling?

    • Is the root cause of this assertion failure related to the accuracy setting?
      (Is it likely caused by an incorrect CONFIG_CLOCK_CONTROL_NRF_K32SRC_ACCURACY value, or could there be another reason?)

    • What is the functionality of CONFIG_MPSL_USE_EXTERNAL_CLOCK_CONTROL?
      What exactly changes when it's set to y compared to n?

  • Hi Angus,

    If you haven't, could you please apply the workaround for known issue DRGN-25261, documented at the page linked below?
    https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/known_issues.html#multiprotocol_service_layer_mpsl

    What is the root cause of this assertion failure?
    AngusKu said:
    Is the root cause of this assertion failure related to the accuracy setting?
    (Is it likely caused by an incorrect CONFIG_CLOCK_CONTROL_NRF_K32SRC_ACCURACY value, or could there be another reason?)

    The assert means that the 32MHz crystal didn't start on time.

    You will need to ensure that CONFIG_MPSL_HFCLK_LATENCY is set correctly, and the load capacitance is correct.

    Is CONFIG_MPSL_USE_EXTERNAL_CLOCK_CONTROL=y the correct and recommended solution for this issue on nRF54L15?

    No, it isn't.

    Are there any side effects or considerations when using external clock control in this context?
    AngusKu said:
    What is the functionality of CONFIG_MPSL_USE_EXTERNAL_CLOCK_CONTROL?
    What exactly changes when it's set to y compared to n?

    It changes the clock driver to Zephyr clock driver instead of the MPSL internal clock driver. However, it is not intended to be used with the nRF54L15.

  • Hi Hieu,

    I had to increase CONFIG_MPSL_HFCLK_LATENCY beyond the value mentioned in DRGN-25261 — the default 854 plus 512, totaling 1366 — in order to clearly avoid assertions.

    I really appreciate your help with this.

    I hope you can provide the detailed information about

    • Any potential side effects caused by increasing this value?
      • especially regarding BLE transmission and data transfer with other Bluetooth devices?
  • Hi Angus,

    What is the value of CONFIG_MPSL_HFCLK_LATENCY you are using?

  • Hi Hieu,
    I changed the value to 2000 and tried rebooting 10 times without encountering any assertions.

    • Could you help me understand the impact of modifying CONFIG_MPSL_HFCLK_LATENCY?
    • Would like to confirm if there are any potential side effects by increasing this value?
      • Especially in the context of using your Sidewalk SDK in the future, where the device will connect to the Amazon gateway over BLE to exchange data.

    Thanks in advance for your support.

Reply
  • Hi Hieu,
    I changed the value to 2000 and tried rebooting 10 times without encountering any assertions.

    • Could you help me understand the impact of modifying CONFIG_MPSL_HFCLK_LATENCY?
    • Would like to confirm if there are any potential side effects by increasing this value?
      • Especially in the context of using your Sidewalk SDK in the future, where the device will connect to the Amazon gateway over BLE to exchange data.

    Thanks in advance for your support.

Children
  • Hi Angus,

    CONFIG_MPSL_HFCLK_LATENCY tells MPSL what the HFCLK startup time should be. Depends on your crystal and circuit, a value of 2000 might be normal, or might indicate an issue, in which case it's most likely hardware.

    To check which case this is, could you please share the following?

    • Part number of the 32MHz crystal used
    • The 32MHz crystal part of the schematic
    • What you have set in the hfxo DeviceTree node.
      Here's the configuration for the nRF54L15 DK for reference.
      &hfxo {
        load-capacitors = "internal";
        load-capacitance-femtofarad = <15000>;
      };
  • Hi Hieu,

    Part number of the 32MHz crystal used

    ABM12W-32.0000MHZ-4-D1X-T3

    The 32MHz crystal part of the schematic

    The current board I’m using does not have the CRYSTAL load capacitors populated.

    What you have set in the hfxo DeviceTree node.

    We use the same configuration for the nRF54L15 DK 

    Our EE team has informed us that the missing CRYSTAL load capacitors are causing a ppm deviation in the crystal frequency. We plan to fine-tune this in the next hardware revision to resolve the issue.

    Before we get the next hardware, could you help me understand the impact of the current configuration changes?

    • Would adjusting CONFIG_MPSL_HFCLK_LATENCY affect communication ?
      • specifically when connecting to the Amazon gateway over BLE to exchange data?

    • If we use the nRF54L15 HFXO configuration with the current hardware setup (i.e. without load capacitors),
      Could this cause any issues or unexpected behavior?

    • Once the load capacitors are added in the next revision —
      including the associated ppm adjustment (e.g., related to BT_MESH_TIME_SRV_CLOCK_ACCURACY) —
      • Could you advise how to reconfigure the HFXO settings accordingly?
  • Hi Angus,

    AngusKu said:

    The 32MHz crystal part of the schematic

    The current board I’m using does not have the CRYSTAL load capacitors populated.

    AngusKu said:
    Our EE team has informed us that the missing CRYSTAL load capacitors are causing a ppm deviation in the crystal frequency. We plan to fine-tune this in the next hardware revision to resolve the issue.
    AngusKu said:
    If we use the nRF54L15 HFXO configuration with the current hardware setup (i.e. without load capacitors),
    Could this cause any issues or unexpected behavior?
    AngusKu said:
    Could you advise how to reconfigure the HFXO settings accordingly?

    The nRF54L15 support an adjustable internal capacitor, so not using the external capacitor is fine.
    Refer here: OSCILLATORS — Oscillator control.

    The internal capacitor simply has to be configured correctly. We get to this next.

    AngusKu said:
    What you have set in the hfxo DeviceTree node.

    We use the same configuration for the nRF54L15 DK 

    Referring to the configuration:

    &hfxo {
      load-capacitors = "internal";
      load-capacitance-femtofarad = <15000>;
    };

    In configures the device to set the internal capacitance to 15000fF (femtofarad).

    This is not the correct value for your crystal. Referring to the same documentation linked above, if we assume the parasitic capacitance from the PCB is the same on both ends of the crystal, the internal capacitance value can be calculated with:

    C_int = C_crystal_load * 2 - C_pcb.

    You can refer to your hardware engineer for a precise estimation of the PCB parasitic capacitance. From our experience, it is usually under 1pF, so you can use 0.5~1pF if needed.

    You can find the load capacitance for your crystal is specified at 4pF.

    Please adjust the load-capacitance-femtofarad property according to the calculation, and retry with CONFIG_MPSL_HFCLK_LATENCY value of 1366 (default + DRGN-25261 workaround).

    AngusKu said:
    Once the load capacitors are added in the next revision —
    including the associated ppm adjustment (e.g., related to BT_MESH_TIME_SRV_CLOCK_ACCURACY)

    So, please note that the BT_MESH_TIME_SRV_CLOCK_ACCURACY is based off of the LFCLK, 32kHz, not the HFCLK we are talking about. Therefore, changes in the HFCLK accuracy shouldn't impact the LFCLK accuracy and related parameters.

    This is unless you are configuring the LFCLK to source from the HFCLK.

    AngusKu said:
    Would adjusting CONFIG_MPSL_HFCLK_LATENCY affect communication ?
    • specifically when connecting to the Amazon gateway over BLE to exchange data?

    Let's try adjusting the Devicetree config first and see how it works.

  • Hi Hieu,

    Thank you very much! Based on your suggestion and the formula you provided, I reconfigured hfxo load-capacitance-femtofarad = <7000>.
    With this setting, along with a CONFIG_MPSL_HFCLK_LATENCY value of 1366, I performed 50 restarts and did not encounter the "MPSL ASSERT: 1, 1385" system crash issue.

    Next, once I complete the Sidewalk gateway setup, I will begin testing and get back to you to confirm whether there are any other transmission-related issues.


    BTW:
    I noticed that there are a bug fixe for (DRGN-25261) in your v3.1.0 release.
    Does this mean that if we upgrade to a newer SDK version later, we should revert CONFIG_MPSL_HFCLK_LATENCY back to its default value?

  • Hi Angus,

    AngusKu said:
    I noticed that there are a bug fixe for (DRGN-25261) in your v3.1.0 release.
    Does this mean that if we upgrade to a newer SDK version later, we should revert CONFIG_MPSL_HFCLK_LATENCY back to its default value?

    Yes, if you upgrade to v3.1.0 or later, you can use the default CONFIG_MPSL_HFCLK_LATENCY and disregard the DRGN-25261 workaround.

Related