nRF52 Random Fault #nrf52832

rtalbott@...
 

Hello,

I just started working on a new project and giving zephyr a try.  I have came to a problem that I can't seem to easily root cause.

I'm using nRF52832 with BLE running and also running a seperate thread controlling PWM for LED brightness control.  The program runs fine for several minutes and then I will get a hard fault.  This leads me to think there is a memory leak but I'm not doing any dynamic memory allocations.  The "faulting instruction" tends to change from run to run.

Here is output from one run:

- - - - - - - - - - - - - - - - - TARGET RESET - - - - - - - - - - - - - - - - -
***** Booting Zephyr OS v1.14.0-rc1-1366-gcb44b7e76861 *****
 
[00:00:03.423,126] [0m<inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)[0m
[00:00:03.423,126] [0m<inf> bt_hci_core: HW Variant: nRF52x (0x0002)[0m
[00:00:03.423,156] [0m<inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 1.14 Build 0[0m
[00:00:03.423,522] [1;33m<wrn> bt_hci_core: No ID address. Expecting one to come from storage.[0m
Bluetooth initialized
 
[00:00:03.424,102] [0m<inf> bt_hci_core: Identity: d0:97:29:94:70:ec (random)[0m
[00:00:03.424,102] [0m<inf> bt_hci_core: HCI: version 5.0 (0x09) revision 0x0000, manufacturer 0x05f1[0m
[00:00:03.424,102] [0m<inf> bt_hci_core: LMP: version 5.0 (0x09) subver 0xffff[0m
Advertising successfully started
 
starting cycle.
 
***** USAGE FAULT *****
 
  Illegal load of EXC_RETURN into PC
 
***** Hardware exception *****
 
Current thread ID = 0x20000064
Faulting instruction address = 0xb1c
 
Fatal fault in essential thread! Spinning...
----------------------------------------------------------------------------------------------
using addr2line with address set to 0xb1c returns:
/home/buildslave/src/github.com/zephyrproject-rtos/sdk-ng/build/build_arm/.build/arm-zephyr-eabi/src/gcc/libgcc/libgcc2.c:1082 (discriminator 7)


Now trying with CONFIG_NO_OPTIMIZATIONS=y results in not being able to run and faults immediately after start:
- - - - - - - - - - - - - - - - - TARGET RESET - - - - - - - - - - - - - - - - -
***** Booting Zephyr OS v1.14.0-rc1-1366-gcb44b7e76861 *****
 
***** USAGE FAULT *****
 
  Illegal use of the EPSR
 
***** Hardware exception *****
 
Current thread ID = 0x200008b0
Faulting instruction address = 0x2dd32
 
Fatal fault in thread 0x200008b0! Aborting.
 
starting cycle.
----------------------------------------------------------------------------------------------
 
using addr2line with address 0x2dd32 returns:
/home/rick/repos/project/app/zephyr/subsys/bluetooth/controller/ll_sw/ll_filter.c:805
 
Any idea what is going on here?

Thanks



Join users@lists.zephyrproject.org to automatically receive all group messages.