Hello Team,
I have interfaced Oled with NRF52805 on i2C.
I have used SDK 15.1.0. and ble_app_uart example [s112].
My problem :
I have made some customized functions and I put one function inside BLE_GAP_EVT_DISCONNECTED event [ when the device receives events from ble_evt_handler ]
- When the device receives the BLE_GAP_EVT_DISCONNECTED event at that time I am just printing the device disconnected message on OLED but at that time
seggar embedded studio STOPS working I don't know where is the exact problem!
here is the code,
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
case BLE_GAP_EVT_DISCONNECTED:
NRF_LOG_INFO("############################################### Disconnected! ###############################################");
TG_NoActivity_Timer_STOP(SYSTEM_ON_MODE); // SYSTEM ON mode Disable when device disconnected
TG_NoActivity_Timer_START(SYSTEM_OFF_MODE);// SYSTEM OFF mode Enable when device disconnected
__TG_LED_indication(TG_INDICATE_ADVERTISING_MODE);
clear_display();
if(u8LastOledPageLine>4)
{
App_data_wth_font_size(__OLED_PAIRING_MODE, FONT_3x5, sizeof(__OLED_PAIRING_MODE),(u8LastOledPageLine-4),0);
}
else
{
App_data_wth_font_size(__OLED_PAIRING_MODE, FONT_3x5, sizeof(__OLED_PAIRING_MODE),(4 + u8LastOledPageLine),NULL);
}
clear_display();
m_conn_handle = BLE_CONN_HANDLE_INVALID;
u8DeviceConnected = 0;
break;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Note :
- The same function is working inside the BLE_GAP_EVT_CONNECTED event I have checked it several times without an issue!!
but when I placed the same function inside the BLE_GAP_EVT_DISCONNECTED event with a different message my software stops working
- I have placed DEBUG preprocessor inside the preprocessor and placed breakpoint at app_error_fault_handler inside app_error.c but it is not giving me any information like where the program is stuck.
Best and regard,
Dipak


