Dear Dialog_Support,
I have configured extended sleep mode in my application code. In that, i am using external push button interrupt wake up, wake up from I2C interrupt and wake up from App when we write into characteristics. And after 10 seconds of wake up if there is no any input it goes to sleep again. I have used timer to wake up the device for 10 seconds and then again go into sleep.
The issue i am facing is that, sometime device operates smoothly and sometime its not taking push button interrupt. Also when App tries to connect with device then App shows "connecting, "connection fail", "Disconnected" status.
Can you please look at my application code once. I have attached my project folder link.
https://drive.google.com/open?id=1ZGN-Me9Nx-tKeLZsC6i_whR0zOvbO_7H
Thank you in advance.
With Regards,
Ruchi Patel
Hi Ruchi Patel,
Regarding that the device isn't waking up sometimes, i dont see anything suspicious in the code that you have uploaded, i see that you have used the waking up procedure via an external interrupt as the ble_app_sleepmode suggests, in order to check this you will have to debug the fw and check under which conditions the interrupt doens't occur, check if the callback of the interrupt triggers (app_button_press_cb()), check if the app_easy_wakeup() function is executed (there is a condition before that execution of the function, check if this is always true when the interrupt hits, perhaps the device goes to sleep without the arch_ble_ext_wakeup_on() has been invoked). Also check the lines and make sure that there is actually an interrupt on the line in order for the interrupt to get triggered.
Regarding the disconnection that occurs, you can start by checking the disconnection reason when the disconnection occurs and check the reason of the disconnection, i can see that there is a app_easy_gap_disconnect() being invoked when the central writes to the CUST1_IDX_INITIALISATION_ALERT_CHAR characteristic which i suppose is something that a custom central should do upon connection, so check if upon writing the disconnection is triggered.
Thanks MT_dialog
Dear Dialog_Support,
Thank you for the response.
I have checked all the api you have mentioned. I have commented the app_easy_gap_disconnect() function in CUST1_IDX_INITIALISATION_ALERT_CHAR characteristic. Now device is more stable than it was.
I came to know during testing that device goes into arch_main.c at this line.
// restore interrupts
GLOBAL_INT_START();
Is LP_CLK_RCX20 clock used during low power mode? or we can keep using LP_CLK_XTAL32 clock?
Thanks and Regards,
Ruchi Patel
Hi Ruchi Patel,
Yes, right after WFI() the device enables the interrupts by invoking the GLOBAL_INT_START().
For the low power clock you have two options if you are in buck mode then you can choose between the RCX or an XTAL32 (which is an external crystal), if you are in boost mode then your only option is the XTAL32.
Thanks MT_dialog