Usage fault in NCS v2.7.0

Hi,

I have updated the device application firmware from nRF Connect SDK v2.6.1 to v2.7.0. 

The firmware was working fine in v2.6.1 without issue. But the same firmware is running into hard fault for SDK v2.7.0

In log, I can see the USAGE FAULT error. It shows the  Illegal use of the EPSR and sometimes Unaligned memory access. Following is the error detail,

*** Booting My Application v1.3.0-beta-98d26a300f1a ***
*** Using nRF Connect SDK v2.7.0-5cb85570ca43 ***
*** Using Zephyr OS v3.6.99-100befc70c74 ***
[00:00:00.008,941] <inf> fs_nvs: 2 Sectors of 4096 bytes
[00:00:00.009,307] <inf> fs_nvs: alloc wra: 0, fd0
[00:00:00.009,674] <inf> fs_nvs: data wra: 0, 1c
[00:00:00.010,131] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision: 
                                            d6 da c7 ae 08 db 72 6f  2a a3 26 49 2a 4d a8 b3 |......ro *.&I*M..
                                            98 0e 07 7f                                      |....             
[00:00:00.014,221] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:00.014,648] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
[00:00:00.015,045] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 214.51162 Build 1926957230
[00:00:00.016,143] <inf> bt_hci_core: No ID address. App must call se[00:00:21.809,936] <wrn> bt_hci_core: opcode 0x200a status 0x0d
[00:00:33.065,460] <err> os: ***** USAGE FAULT *****
[00:00:33.065,795] <err> os:   Illegal use of the EPSR
[00:00:33.066,162] <err> os: r0/a1:  0x20004040  r1/a2:  0x000013d5  r2/a3:  0x0000523f
[00:00:33.066,680] <err> os: r3/a4:  0x000013c1 r12/ip:  0x000013c1 r14/lr:  0x000013c1
[00:00:33.067,169] <err> os:  xpsr:  0x00000000
[00:00:33.067,504] <err> os: Faulting instruction address (r15/pc): 0x000013c1
[00:00:33.067,962] <err> os: >>> ZEPHYR FATAL ERROR 35: Unknown error on CPU 0
[00:00:33.068,420] <err> os: Current thread: 0x2000bcb8 (unknown)
[00:00:33.068,817] <err> os: Halting system
*** Booting My Application v1.3.0-beta-98d26a300f1a ***
*** Using nRF Connect SDK v2.7.0-5cb85570ca43 ***
*** Using Zephyr OS v3.6.99-100befc70c74 ***
[00:00:00.008,941] <inf> fs_nvs: 2 Sectors of 4096 bytes
[00:00:00.009,307] <inf> fs_nvs: alloc wra: 0, fd0
[00:00:00.009,674] <inf> fs_nvs: data wra: 0, 1c
[00:00:00.010,131] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision: 
                                            d6 da c7 ae 08 db 72 6f  2a a3 26 49 2a 4d a8 b3 |......ro *.&I*M..
                                            98 0e 07 7f                                      |....             
[00:00:00.014,221] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:00.014,648] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
[00:00:00.015,075] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 214.51162 Build 1926957230
[00:00:00.016,143] <inf> bt_hci_core: No ID address. App must call se[00:00:11.894,958] <wrn> bt_hci_core: opcode 0x200a status 0x0d
[00:00:34.955,596] <err> os: ***** USAGE FAULT *****
[00:00:34.955,932] <err> os:   Unaligned memory access
[00:00:34.956,298] <err> os: r0/a1:  0x2000bbad  r1/a2:  0x0000002c  r2/a3:  0x200308ec
[00:00:34.956,817] <err> os: r3/a4:  0x00000040 r12/ip:  0x00000000 r14/lr:  0x0006e0e5
[00:00:34.957,305] <err> os:  xpsr:  0x21000000
[00:00:34.957,672] <err> os: Faulting instruction address (r15/pc): 0x0006e0ce
[00:00:34.958,099] <err> os: >>> ZEPHYR FATAL ERROR 31: Unknown error on CPU 0
[00:00:34.958,557] <err> os: Current thread: 0x20012a30 (unknown)
[00:00:34.958,984] [1;31m<err> os: Halting system

The device is working as a BLE extender and has a central and peripheral role. (1 peripheral and multiple central).

I observed an error occur in the device when it is already connected (via peripheral) and it initiates a connection to another peripheral (using central).

The extender device has an nRF52840 chip and uses nRF Connect SDK v2.7.0.

Would you please help me to debug and fix this issue?

Let me know any other information require.

Thanks,

Narendra.

Parents
  • It would still be nice to know the context of the thread that is triggering this Fault exception. Right now it shows

    Current thread: 0x2000bcb8 (unknown)

    Can you add these in your prj.conf, prestine build and run your applicaiton to provide some more detailed fault into here? That was, we can know what is the context of the fault, that will have impact on our debugging direction.

    CONFIG_ASSERT_VERBOSE=y
    CONFIG_ASSERT_NO_COND_INFO=n
    CONFIG_ASSERT_NO_MSG_INFO=n
    CONFIG_RESET_ON_FATAL_ERROR=n
    CONFIG_THREAD_NAME=y
    CONFIG_STACK_SENTINEL=y

Reply
  • It would still be nice to know the context of the thread that is triggering this Fault exception. Right now it shows

    Current thread: 0x2000bcb8 (unknown)

    Can you add these in your prj.conf, prestine build and run your applicaiton to provide some more detailed fault into here? That was, we can know what is the context of the fault, that will have impact on our debugging direction.

    CONFIG_ASSERT_VERBOSE=y
    CONFIG_ASSERT_NO_COND_INFO=n
    CONFIG_ASSERT_NO_MSG_INFO=n
    CONFIG_RESET_ON_FATAL_ERROR=n
    CONFIG_THREAD_NAME=y
    CONFIG_STACK_SENTINEL=y

Children
No Data
Related