LFXO doesn't start with nRF54LM20B and nPM1300 until a debugger reset or RTT session is started

Hello,

we have a custom PCB with the NRF54LM20B (nRF54LM20B_xxAA_ENGB) and nPM1300, and we are observing odd behavior with the LFXO failing to start from a cold boot, causing the system to hang in MCUBoot (which waits for the LFXO to be ready to supply the GRTC), unless an RTT session is attached or the board reset via the debugger, which causes the LFXO to start successfully. The LFXO also starts successfully from warm (re)-boots.

The mounted LFXO crystal is the ECS-.327-7-12-C-TR with a load capacitance of 7pF and ESR of 90k: https://ecsxtal.com/products/crystals/surface-mount-crystals/ecs-327-7-12-c-tr/

The device tree is configured as follows:

/* ECS-.327-7-12-C-TR (CL = 7 pF): C_INT ~= 2 * CL - ~1 pF stray (internal-cap equation). */
&lfxo {
load-capacitors = "internal";
load-capacitance-femtofarad = <13000>;
};

/* ECS-320-8-37B (CL = 8 pF): C_INT ~= 2 * 8 pF - ~1 pF stray, as for &lfxo. */
&hfxo {
load-capacitors = "internal";
load-capacitance-femtofarad = <15000>;
};

The system is powered by an nPM1300, which provides the 1V8 VDD of the nRF via BUCK1. The BUCK1 is configured to 1V8 via the VSET resistor (47k).
The schematic for the nPM1300 has been reviewed by Nordic before, and all capacitances (i.e. input and output capacitors) match the requirements. I don't think the PMIC is the issue.

The debugger is an nRF54LM20DK, connected with the 10-pin cable to our PCB. The board programs fine.

We also have a RESET button wired to the reset of the MCU, but that doesn't seem to have any effect (it does restart the board, but LFXO still fails to start). The reset has to come from the debugger, either via the reset command (below), or attaching an RTT session. Something else must happen during the debugger reset.

[15:08:47] nrfutil-device reset --serial-number 001051895398 --json
[15:08:48] Success.

Below is a screenshot of the power before and after the debugger reset (with the reset in the middle).

I have tried the following things without much success:

  • Changing the internal load capacitors values (from 9000 to 15000) -> no change in behavior
  • Probing the 1V8 rail powering the MCU -> nothing unusual, the 1V8 becomes stable within 200uS of VBAT/VBUSIN without any peaking, dips, brown-out or noise
  • Probing the LFXO -> when the LFXO doesn't start, I just see two weak pulses on the crystal and back to nothing. when it is running, I see a sine-wave of around 32.768kHz.

Are there any registers I can probe or read-out that tell me what could be going wrong and why the LFXO is not starting?
Is the crystal maybe out-of-spec for the nRF54LM20B?
Is this maybe an issue with the ENGB SoC itself or part of an errata?

We are using the nRF Connect SDK v3.4.1 and the board config uses MCUboot with the second app slot on an external flash IC, very similar to the nRF54LM20DK configuration.

Thank you!

  • HI! just see you post while I'm preparing to post an issue details + patch for seomthing similar around lfxo.
    On our nrf54L15 board, we notice a extra powerconsumption (~200uA @ 1.8V) after a POR compared to a warm reset.
    The root cause was OSCILLATORS->XOSC32KI.INTCAP being updated (from DTS value) after the oscillator was already started (on warm reset, the previous INTCAP value is still present in the register and there is no new update)
    Arnaud

  • Hello Einar,

    as far as I understand, this is a different issue. The other post from amo-inv was about the ordering, for which the fix you linked to is already included in the v3.4.1 SDK we're using.

  • Hi,

    You are right, this is a different matter. I am not able to say what caues this, though. A few questions:

    1. Does this happen consistently, or only some times?

    2. How did you verify that the booltoader wait for the LFXO to start? Can you share that details (where it is waits etc)?

    3. Have you verified that this only happens when using LFXO? What if you configure LFRC in both the application and bootloader, does it stil happen? You can do that by adding CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y in the configuration for both, and additionally CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=n in the bootlaoder config.

  • Hello Einar,

    1. This happens on every cold boot. We can also see a slightly higher current consumption in this state (roughly 100uA).

    For Question 2 and 3 I have used the Nordic MCP to dig deeper into the callstack and asked it for a write-up, please see below:


    1. It happens consistently on every power-on reset. It never happens after a warm reset, after a debugger reset, or once an RTT session is open.

    2. Located by attaching GDB without a reset to a hung board and reading the call stack and registers before resuming.

    With the default config (CONFIG_NRF_GRTC_TIMER_SOURCE_LFXO=y, GRTC CLKSEL=LFXO), it spins in the SYSCOUNTER ready loop (SYSCOUNTERH.BUSY):

      nrf_grtc_sys_counter_low_get                  nrfx/hal/nrf_grtc.h:1742
      __nrfy_internal_grtc_sys_counter_ready_check  nrfx/haly/nrfy_grtc.h:1051
      nrfy_grtc_sys_counter_start                   nrfx/haly/nrfy_grtc.h:304
      nrfx_grtc_syscounter_start                    nrfx/drivers/src/nrfx_grtc.c:529
      sys_clock_driver_init                         zephyr/drivers/timer/nrf_grtc_timer.c:557 (SYS_INIT EARLY, 1)

    With CONFIG_NRF_GRTC_TIMER_SOURCE_SYSTEM_LFCLK=y, the LFXO is started via CLOCK.TASKS_LFCLKSTART (LFCLK.SRC=LFXO) and EVENTS_LFCLKSTARTED never arrives.

    Register state:
      RESET.RESETREAS        = 0x0
      XOSC32KI.INTCAP        = 0xA (DTS value, written at EARLY 0, before the GRTC starts)
      XOSC32KI.STATUS        = 0x7 after attach
      CLOCK.LFCLK.STAT       = 0x10001 after attach

    The firmware is still in the wait loop 8-15 s after power-on. The LFXO starts as soon as the debugger connects, and the boot then continues without a reset.

    3. It also happens with LFRC. Configuration: CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y in both images, plus CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=n in MCUboot. The GRTC then runs on LFLPRC, and LFCLK.STAT = 0x10000 (LFRC running).

    Clock init then passes, but MCUboot hangs during image validation, in the __WFE() loop waiting for the CRACEN interrupt:

      nrf_security_event_wait       nrf/subsys/nrf_security/src/utils/nrf_security_events.c:54
      cracen_wait_for_cm_interrupt  .../cracen/sxsymcrypt/src/platform/baremetal/interrupts.c:108
      sx_hash_wait                  .../cracen/sxsymcrypt/src/hash.c:257
      cracen_hash_update            .../cracen/cracenpsa/src/cracen_psa_hash.c:147
      bootutil_img_hash             bootloader/mcuboot/boot/bootutil/src/bootutil_img_hash.c:188
      bootutil_img_validate         bootloader/mcuboot/boot/bootutil/src/image_validate.c:354

    On debugger attach (no reset), the core is in cracen_direct_isr_handler, and after resuming it boots the application.

    Also tested, with no effect:
    - VREGMAIN in LDO instead of DC/DC
    - POWER.TASKS_CONSTLAT at boot (CONSTLATSTAT = 1 confirmed)
    - Skipping the erratum 37 workaround (FICR 0x33/0x01, NRF_TAD + 0x40C)

    So the hang is not LFXO-specific. After a power-on reset, neither the LFXO start nor the CRACEN completion interrupt happens until a debug connection is made. What does debug power-up enable on the nRF54LM20B (EngB) that firmware does not?

Related