BLE doesn't work when I enable CONFIG_SEGGER_SYSTEMVIEW

Hi,

I'm trying to set up SEGGER SystemView on our custom nRF5340 board for debugging purposes using the SEGGER SystemView application.

Below is the configuration I'm using for SEEGER:

CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG=y
CONFIG_LOG_BACKEND_RTT=y

CONFIG_TRACING=y
CONFIG_THREAD_NAME=y
CONFIG_SEGGER_SYSTEMVIEW=y
CONFIG_SEGGER_SYSVIEW_POST_MORTEM_MODE=n
CONFIG_LOG_BACKEND_UART=n
CONFIG_LOG_BACKEND_RTT=y

CONFIG_MAIN_STACK_SIZE=2048
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_IDLE_STACK_SIZE=1024

The issue arises when I enable CONFIG_SEGGER_SYSTEMVIEW=y. Once it's enabled, BLE stops working. After some debugging, I found that the firmware hangs during the bt_enable() call.

Could you please help me identify the cause of this issue or suggest how to resolve the conflict between SEGGER SystemView and BLE?

Thank you,
Alireza

Parents Reply Children
  • Hi Ammanda,

    I double-checked my code and found that the issue was on my side—during debugging, I had added some extra code that caused the problem. With SDK 3.0.2, BLE now works. However, I encountered a new error:

    [00:01:13.821,044] <err> os: ***** MPU FAULT *****
    [00:01:13.821,075] <err> os: Data Access Violation
    [00:01:13.821,105] <err> os: MMFAR Address: 0xc
    [00:01:13.821,136] <err> os: r0/a1: 0x7fffffff r1/a2: 0x46ebd200 r2/a3: 0x000075e9
    [00:01:13.821,136] <err> os: r3/a4: 0x2000cf60 r12/ip: 0x000000ff r14/lr: 0x0001b71d
    [00:01:13.821,166] <err> os: xpsr: 0xb1000000
    [00:01:13.821,197] <err> os: Faulting instruction address (r15/pc): 0x0001b720
    [00:01:13.821,258] <err> os: >>> ZEPHYR FATAL ERROR 19: Unknown error on CPU 0
    [00:01:13.821,319] <err> os: Current thread: 0x200034f0 (unknown)
    [00:01:14.092,468] <err> os: Halting system

    I think I can fix this, but if I need further help, I’ll reach out.

    Thanks for your support.

    Alireza

  • Hi Amanda,

    As I mentioned, with SDK 3.0.2, BLE works fine. I can enable notifications in my thread, but when I attempt to send a notification, the firmware crashes. Without sending notifications, everything works as expected. Could you please point me toward a solution for this issue?

    [00:01:13.821,044] <err> os: ***** MPU FAULT *****
    [00:01:13.821,075] <err> os: Data Access Violation
    [00:01:13.821,105] <err> os: MMFAR Address: 0xc
    [00:01:13.821,136] <err> os: r0/a1: 0x7fffffff r1/a2: 0x46ebd200 r2/a3: 0x000075e9
    [00:01:13.821,136] <err> os: r3/a4: 0x2000cf60 r12/ip: 0x000000ff r14/lr: 0x0001b71d
    [00:01:13.821,166] <err> os: xpsr: 0xb1000000
    [00:01:13.821,197] <err> os: Faulting instruction address (r15/pc): 0x0001b720
    [00:01:13.821,258] <err> os: >>> ZEPHYR FATAL ERROR 19: Unknown error on CPU 0
    [00:01:13.821,319] <err> os: Current thread: 0x200034f0 (unknown)
    [00:01:14.092,468] <err> os: Halting system

    Please note that without enabling "CONFIG_SEGGER_SYSTEMVIEW", the firmware runs without any problems.

    Thanks

Related