nRF5340 SoC with nPM1304 PMIC gets stuck in bootloader

Hi,

Let me explain my situation. I have several custom boards with an nRF5340 SoC and an nPM1300 PMIC. I flashed a custom image developed with nRF Connect SDK v3.0.1, and all the boards operate correctly.

Now, I want to replace the nPM1300 with the nPM1304 to meet certain requirements and designs. Therefore, I upgraded the SDK from v3.0.1 to v3.1.1 to support the nPM1304 and reworked three nPM1304 modules on my three custom boards. After flashing the new image to these boards, two boards get stuck in the bootloader, while one board boots normally. The boot log for the failing boards is as follows:

*** Booting MCUboot v2.1.0-dev-9b4ae4cbc9e2 ***
*** Using nRF Connect SDK v3.1.1-e2a97fe2578a ***
*** Using Zephyr OS v4.1.99-ff8f0c579eeb ***
[0:0:0.275,299] <inf> mcuboot: Starting bootloader
[0:0:0.275,634] <dbg> mcuboot: context_boot_go: context_boot_go
abort()

I also tried flashing the SDK v3.0.1 image to the two boards that previously failed to boot. Both boards booted normally, regardless of whether they were powered via VBAT or VBUS, and the SoC could enable LDO1 and LDO2 via I2C.

I am not sure what caused this issue. I found a similar ticket on Nordic Q&A titled "Code just logs 'abort()'". In that case, the problem was that there was no mcuboot file under the sysbuild folder. I have checked my project directory and confirmed that the mcuboot configuration file exists. Could this issue be related to the dual-image design?

Could someone please help me with this?
Please let me know if you need any additional information for debugging.

SoC: nRF5340
PMIC: nPM1304
SDK version: v3.1.1

Thank you very much!

Best regards,
Kevin

Parents
  • Hello Kevin,

    I can't think of any relevant changes between SDK v3.0.x and v3.1.x that could explain this change in behaviour. To troubleshoot this, please try enabling CONFIG_PICOLIBC_ASSERT_VERBOSE in the bootloader build. This will hopefully tell us were the assert was raised.

    Best regards,

    Vidar

  • Hi Vidar,

    To make it easier to understand, I created a simple tree diagram of my project, as shown below:


    I've tried adding this configuration to one of the files in the Kconfig section, such as mcuboot_dual_image_rtt.conf, but the result is still the same, no change at all. Or am I misunderstanding something?

    Best regards,
    Kevin

  • Hi Kevin,

    I was looking at the assert.c implementation for for Picolib where I assume abort() is being called:

    but forgot to point out that you also need to enable asserts in this build. Is your bootloader also using Picolib? If so, please try with the following configs:

    CONFIG_ASSERT=y
    CONFIG_PICOLIBC_USE_MODULE=y
    CONFIG_PICOLIBC_ASSERT_VERBOSE=y
     
    Best regards,
    Vidar
  • Hi Vidar,

    Thank you for reminding me. The debugging log is as follows:

    SEGGER J-Link V8.94 - Real time terminal output
    SEGGER J-Link V9.7, SN=602718579
    Process: JLinkExe
    *** Booting MCUboot v2.1.0-dev-9b4ae4cbc9e2 ***
    *** Using nRF Connect SDK v3.1.1-e2a97fe2578a ***
    *** Using Zephyr OS v4.1.99-ff8f0c579eeb ***
    [0:0:0.275,268] <inf> mcuboot: Starting bootloader
    [0:0:0.275,634] <dbg> mcuboot: context_boot_go: context_boot_go
    ASSERTION FAIL [0] @ WEST_TOPDIR/zephyr/lib/libc/picolibc/assert.c:15
            assertion "rc == 0" failed: file "WEST_TOPDIR/bootloader/mcuboot/boot/bootutil/src/loader.c", line 2988, function: context_boot_go


    Thank you.

    Best regards,
    Kevin

Reply
  • Hi Vidar,

    Thank you for reminding me. The debugging log is as follows:

    SEGGER J-Link V8.94 - Real time terminal output
    SEGGER J-Link V9.7, SN=602718579
    Process: JLinkExe
    *** Booting MCUboot v2.1.0-dev-9b4ae4cbc9e2 ***
    *** Using nRF Connect SDK v3.1.1-e2a97fe2578a ***
    *** Using Zephyr OS v4.1.99-ff8f0c579eeb ***
    [0:0:0.275,268] <inf> mcuboot: Starting bootloader
    [0:0:0.275,634] <dbg> mcuboot: context_boot_go: context_boot_go
    ASSERTION FAIL [0] @ WEST_TOPDIR/zephyr/lib/libc/picolibc/assert.c:15
            assertion "rc == 0" failed: file "WEST_TOPDIR/bootloader/mcuboot/boot/bootutil/src/loader.c", line 2988, function: context_boot_go


    Thank you.

    Best regards,
    Kevin

Children
Related