Wake up from external event

2 posts / 0 new
Last post
MichaO
Offline
Last seen:3 months 3 weeks ago
加入:2015-08-11 14:30
Wake up from external event

Hi.
We try to build BLE application which should wake up from extended sleep mode as a result of both synchronous and asynchronous events. The implementation of asynchronous event has been done according to UM-B-006 document, based on WakeUp timer.
1)在ISR event_flag常规,我们集
2) In Hook#2 - app_asynch_proc() - we clear event_flag and send a message to APP task
3)In APP task we do what we have to do...

The problem is a huge delay between external event and its processing in APP task. Its value is between 5 up to hundreds of milliseconds.
The weird thing is the duration of delay is a function of interval between external events. For example if few seconds passed after previous external event the delay will be about 5 msec. If 30 minutes passed after previous external event the delay will be about 130 msec.

In fact we can't afford more then 1 msec delay
Can you help me?

Keywords:
Device:
MT_dialog
Offline
Last seen:5 days 18 hours ago
Staff
加入:2015-06-08 11:34
Hi MichaO,

Hi MichaO,

When the external interrupt occurs are you waking up the ble (ble_force_wakeup), if the execution of the external interrupt takes so long (until the task app) it might be due to the fact that you send the message but it is scheduled and sent when the BLE eventually wakes up, which might be in the next wake up event (an advertise or a connection event).

Thanks MT_dialog