This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Periodic crash in Softdevice

Hi,

I'm experiencing frequent crashes in the softdevice on an nrf52832, running SD version 6.0.0 with SDK 15.0. The crash seems to occur when interfacing to the device over BLE, however it is not consistent in terms of timing or what operation is being performed. The traceback for the crash is always the same (see below) and the pc value given always points to 85568 (0x14e40), which is in the softdevice memory space:

Program received signal SIGTRAP, Trace/breakpoint trap.
0x0002699a in app_error_fault_handler (id=1, pc=85568, info=0) at ./NordicSDK15/components/libraries/util/app_error_weak.c:103
(gdb) where
#0  0x0002699a in app_error_fault_handler (id=1, pc=85568, info=0) at ./NordicSDK15/components/libraries/util/app_error_weak.c:103
#1  0x00023684 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) 

The device is running the Nordic UART service and battery service as well as one custom service. It doesn't seem to matter which service you interact with, it always crashes eventually (usually after less than 1 minute). When not performing any BLE operation the device is stable.

I note that the error code is always 1 which corresponds to NRF_ERROR_SVC_HANDLER_MISSING, but I'm not sure how this can happen in the case where the SDK and SD are matched.

Build environment is Ubuntu 16.04 with the latest GCC-Arm-Embedded:

$ arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/bin/../lib/gcc/arm-none-eabi/7.3.1/lto-wrapper
Target: arm-none-eabi
Configured with: /build/gcc-arm-none-eabi-fqNcqu/gcc-arm-none-eabi-7-2018q2/src/gcc/configure --target=arm-none-eabi --prefix=/build/gcc-arm-none-eabi-fqNcqu/gcc-arm-none-eabi-7-2018q2/install-native --libexecdir=/build/gcc-arm-none-eabi-fqNcqu/gcc-arm-none-eabi-7-2018q2/install-native/lib --infodir=/build/gcc-arm-none-eabi-fqNcqu/gcc-arm-none-eabi-7-2018q2/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/build/gcc-arm-none-eabi-fqNcqu/gcc-arm-none-eabi-7-2018q2/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/build/gcc-arm-none-eabi-fqNcqu/gcc-arm-none-eabi-7-2018q2/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/build/gcc-arm-none-eabi-fqNcqu/gcc-arm-none-eabi-7-2018q2/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/build/gcc-arm-none-eabi-fqNcqu/gcc-arm-none-eabi-7-2018q2/install-native/arm-none-eabi --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for Arm Embedded Processors 7-2018-q3-update' --with-multilib-list=rmprofile
Thread model: single
gcc version 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] (GNU Tools for Arm Embedded Processors 7-2018-q3-update) 

Any help would be appreciated. I'm happy to provide further information upon request.

Thanks.

Rob

Related