Hello everyone. I have a question about sleep_mode_enter() behavior. I'm using nRF5_SDK_12.3.0 and nRF51822 for my project.
I put a lot of printf statements in the example project "ble_app_uart" to see how this program actually works. Then, I noticed that functions before sleep_mode_enter never get called or stopped in middle of execution.
for example, in on_adv_evt function
I put a printf statement
case BLE_ADV_EVT_IDLE:
printf("BLE_ADV_EVT_IDLE\r\n"); //Here
sleep_mode_enter();
break;
My terminal only shows "B" not "BLE_ADV_EVT_IDLE". if you have more statements between the above printf statement and sleep_mode_enter, these functions were never called.
Can anyone tell me why this happens? Thank you.