Other Parts Discussed in Thread: ENERGYTRACE
I encountered some problems when debugging this project:
1. When the APP task task reaches setting GapAdv_create #2, it will jump to execute SimplePeripheral_advCallback (this function is the callback passed to the BLE stack) and enqueue APP_ADV_EVT.
My understanding of this step is: the BLE stack has a higher priority than the APP task, so after GapAdv_enable, the BLE stack can interrupt the running of the APP task, so that SimplePeripheral_advCallback can be executed first. Then it was enabled twice, so APP_ADV_EVT was executed twice.
Is this my understanding correct? Or how do APP task and BLE stack operate?
2. ble_log shows that APP_PERIODIC_EVT will be executed after the initialization is completed, but no action to start the periodic clock during the initialization process was found in the code. May I ask where this APP_PERIODIC_EVT event is turned on?
3.Regarding the APP_PERIODIC_EVT event enqueue function, does it mean there is no task execution?
Thanks & Regards,