Hi all!
In my example after (i guess) 3 mins with out BLE connection the system goes to sleep mode. ¿Is there any way to avoid this ?
Thank you so much!
Hi all!
In my example after (i guess) 3 mins with out BLE connection the system goes to sleep mode. ¿Is there any way to avoid this ?
Thank you so much!
Yes, you can avoid it by checking the context in which your program calls sleep functions (most likely some timer callback) and modify the logic to your needs. Depending on the type of sleep you need to search in your code calls to __WFE() and/or sd_app_evt_wait() and/or sd_power_system_off().
Put breakpoints at those instances, start your program in debug mode and run the program. When some of those breakpoints are hit, check the function call stack to understand the context of that logic and change it to your needs.
Try changing the 180 seconds (1800x10mSecs or 3 minutes) to 0:
#define APP_ADV_DURATION 18000 /**< The advertising duration (180 seconds) in units of 10 milliseconds. */
A value of '0' means "forever"