when we pass the BLE event handler as a function argument to BLE stack init function and register the function results in a deadlock mechanism. Is that we cant able to register the event handler function by passing as an argument to stack init
when we pass the BLE event handler as a function argument to BLE stack init function and register the function results in a deadlock mechanism. Is that we cant able to register the event handler function by passing as an argument to stack init
Hi,
could state which SDK version and SoftDevice version you are using? Also, please attach the code snippet where you set the event handler function pointer.
It could sound like the event handler function pointer is set to a Null pointer. This will lead to a Hardfault and the device will reset.
Best regards
Bjørn
Hi,
I am using Nordic SDK 15.2 and develop my application using c++ as a rogramming language
In mainFile.Cpp Ble_Core_ble_event(ble_evt_t const * p_ble_evt, void * p_context ){ instance->on_ble_Event(ble_evt_t const * p_ble_evt, void * p_context) } ble_stack_init(Ble_Core_ble_event); In BleConfigFile.cpp ble_stack_init(Ble_Core_ble_event) { NRF_SDH_BLE_OBSERVER(m_ble_observer, APP_BLE_OBSERVER_PRIO, BleCore_onBleEvent, NULL); }
When I register member function as event handler function results in a system hang up (not a hard fault error) even though the events are getting triggered from nrf_sdh_ble_evts_poll and nrf_sdh_evts_poll
Does the function pointer Ble_Core_ble_event correspond to its placement in the map file? Do you jump to the correct location in memory when a SD event occur? Maybe the pointer modified somehow?
Does the function pointer Ble_Core_ble_event correspond to its placement in the map file? Do you jump to the correct location in memory when a SD event occur? Maybe the pointer modified somehow?
Thanks for the clarification! I will check