Hello community,
I'm facing a problem with nRF51 DK PCA10028 and a function call on connected or disconnected state including NRF_LOG commands. Using SDK 12.3.0
On connected state I want to wakeup a device on SPI and start communication. On disconnect I want to stop device and put it to standby. Both functions (device_start()/device_stop()) are defined in an extra .h and .c file. If I call device_start() in main, everything works fine.
First I tried to call the function from "on_ble_evt" function and case BLE_GAP_EVT_CONNECTED:
Second, I put the device_start() and device_stop function call to ble_evt_dispatch and if (p_ble_evt->header.evt_id == BLE_GAP_EVT_DISCONNECTED) { event checks.
In both cases, the software crashes --> Debugger moves to address 0xFFFFFF80 and I receive SIGTRAP exception at nrf_log_dequeue() at nrf_log_frontend.c:817 and device hangs
If I remove device_start() and device_stop() function calls, everything works fine.
What's the ideal way to react on connected and disconnected events and execute custom functions?
Thx in advance!
Best regards,
Alexander