SW crash on initialization with MCUMGR and UART_ASYNC_API enabled

Hi,

I faced with an initialization issue of combination two features: MCUMGR and UART_ASYNC_API. I get a crash right after the FW starts. It looks like the SW configuration issue

Crash log:

*** Booting nRF Connect SDK v3.0.2-89ba1294ac9b ***
*** Using Zephyr OS v4.0.99-f791c49f492c ***
[00:00:00.259,521] <err> os: ***** USAGE FAULT *****
[00:00:00.259,552] <err> os:   Illegal use of the EPSR
[00:00:00.259,552] <err> os: r0/a1:  0x0000b54c  r1/a2:  0x20001bba  r2/a3:  0x00000080
[00:00:00.259,582] <err> os: r3/a4:  0x00000000 r12/ip:  0x00000000 r14/lr:  0x00003c1b
[00:00:00.259,582] <err> os:  xpsr:  0x20000000
[00:00:00.259,613] <err> os: r4/v1:  0x00000000  r5/v2:  0x0000b510  r6/v3:  0x00000000
[00:00:00.259,613] <err> os: r7/v4:  0x00000000  r8/v5:  0x00000000  r9/v6:  0x00000008
[00:00:00.259,643] <err> os: r10/v7: 0x00000000  r11/v8: 0x00000000    psp:  0x20003b08
[00:00:00.259,643] <err> os: EXC_RETURN: 0xfffffffd
[00:00:00.259,643] <err> os: Faulting instruction address (r15/pc): 0x00000000
[00:00:00.259,704] <err> os: >>> ZEPHYR FATAL ERROR 35: Unknown error on CPU 0
[00:00:00.259,735] <err> os: Current thread: 0x20001130 (unknown)
[00:00:00.477,264] <err> os: Halting system

I attached the simple project that I use to reproduce this issue (just a simple "hello world" example with enabled options in prj.conf)UART_issue.zip

I use SDK 3.0.2 and toolchain 3.0.2 with nRF52840DK board

  • Hi Hakon,

    I'm not sure what .config file you are referring to. The only file I see is pm.config in my build folder. I'm attaching it. As I sad in my initial post I attached the whole project using zip archive. 

    PM_APP_OFFSET=0x0
    PM_APP_ADDRESS=0x0
    PM_APP_END_ADDRESS=0x100000
    PM_APP_SIZE=0x100000
    PM_APP_NAME=app
    PM_APP_ID=0
    PM_app_ID=PM_APP_ID
    PM_app_IS_ENABLED=1
    PM_0_LABEL=APP
    PM_SRAM_PRIMARY_OFFSET=0x0
    PM_SRAM_PRIMARY_ADDRESS=0x20000000
    PM_SRAM_PRIMARY_END_ADDRESS=0x20040000
    PM_SRAM_PRIMARY_SIZE=0x40000
    PM_SRAM_PRIMARY_NAME=sram_primary
    PM_NUM=1
    PM_ALL_BY_SIZE="sram_primary app"

  • I think maybe I know what's wrong. Can you try setting

    CONFIG_UART_0_INTERRUPT_DRIVEN=n
    CONFIG_UART_0_ASYNC=y

    in prj.conf?

  • Hakon,

    It looks like this config options resolve the issue on boot. I don't see the crash, but UART does not work. Let me describe more about it. I use UART0 for logs and it works. Also, I use UART1 for MCUMGR and I want to use it with async API. When I enable options you recommended I don't see that this UART works. No any answer from it. I modified the test project and attached to this post. As I mentioned earlier, I use nRF52840DK board. Also, .config file is inside attached archive.

    Please, take a look.

    UART_issue_1.zip

  • May I ask you how you are testing this and what your setup looks like?

Related