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

S110 seems to crash after Device Discovery from Master Control Panel

Hi,

My setup is a nRFgo QFAA FA with S110 v.6.0.0 and Motherboard. I am using the latest SDK 5.1.0. The Master Control Panel drives the nrf51822 USB development dongle.

I'm trying to implement a Serial Cable Replacement use case based on the Heart Rate Monitor example. I get up to the point where my custom GATT profile is configured and I start advertising. I call the sd_app_evt_wait() in a loop in main to wait for the next event.

In the Master Control Panel I am able to see the peer with the new device name I assigned. Then I select the device and press Service Discovery to populate the list view. As soon as I press the button the debugger on the nRFgo the Eclipse Debug window comes alive and says:

GDB Hardware Debugger (14.01.14 08:09) (Suspended) Thread [1] (Suspended: Signal 'SIGTRAP' received. Description: Trace/breakpoint trap.) 7 0xfffffffe 6 () 0xfffffff1 5 0x00012b50 4 () 0xfffffff9 3 0x0000fe3e 2 0x0000016a 1 0x0000016a

From the flash addresses it seems that an interrupt handler is called which creates some error immediately. I think this shouldn't happen even if I missconfigured the device. Having read other forum posts I take it that interrupt priority configuration errors may have similar effects. The only interrupts used by my application are configured and implemented by Nordic. I use the following modules in my code:

#include "nordic_common.h" #include "nrf_soc.h" #include "app_timer.h" #include "app_scheduler.h" #include "ble_hci.h" #include "ble_advdata.h" #include "ble_conn_params.h" #include "softdevice_handler.h"

Do you have any hints regarding beginner's errors that can cause such effects?

  • I'd recommend you to remove the reset from app_error_handler and put an infinite loop and a breakpoint there, to see if you hit any errors in your application. Also, I'd also recommend you to try running your application with the GDB command line debugger and see if the behavior is different, since I've sometimes seen strange behavior from Eclipse.

    Finally, make sure that you use the official startupfiles from the SDK.

  • I've seen similar problems and when doing the exact same sequences between Eclipse controlling the gdb-server and a command-line gdb client, the command-line gdb client works better. In my case, I am able to hit a breakpoint I set at on_ble_evt in ble_app_lbs, but when I try the same thing via eclipse, I get this as the call stack: 0xfffffffe <signal handler called>() at 0xfffffff1 0x11498 <signal handler called>() at 0xfffffff9 app_sched_event_get() at app_scheduler.c:143 0x16c80 app_sched_execute() at app_scheduler.c:175 0x16d48 main() at main.c:658 0x14f80

Related