- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have some simple questions about timers in 2073x.
How many HW timer does 2073x soc have?
How many SW timer does WICED Smart SDK 2.x provide?
From the SDK, i can see total four "timer".
Fine time and normal timer;
Application Timer: emconinfo_getAppTimerId(), emconinfo_setAppTimerId() in emconinfo.h
Connection Idle timer: blecm_startConnIdleTimer(), blecm_stopConnIdleTimer() in blecm.h
And in hello sensor app, i noticed below usage and don't understand.
void bleprofile_StopConnIdleTimer(void)
{
if(emconinfo_getAppTimerId() >= 0)
{
blecm_stopConnIdleTimer();
emconinfo_setAppTimerId(-1);
ble_trace0("profile:idletimer stopped");
}
}
I'm a little confused about these timers.
Can someone clarify?
thanks a lot
Solved! Go to Solution.
- Tags:
- timers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I ran this past the developers today, and here is what they came back with:
1.
There are actually two HW timers, but one is used by the firmware exclusively.
2.
All timers mux off of the same system timer.
3.
These are used by the stack, so disregard references to them within bleapp.h:
#define BLEAPP_APP_TIMER_ADV 0x1
#define BLEAPP_APP_TIMER_CONN_IDLE 0x2
#define BLEAPP_APP_TIMER_DIRECT_ADV 0x3
#define BLEAPP_APP_TIMER_SCAN 0x4
#define BLEAPP_APP_TIMER_CONN 0x5
Yes on your understanding as noted at the bottom of item 3 above.
With regards to the last portion of your questions, emconinfo_getAppTimerId() is used by the stack, disregard.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Below is my basic understanding after some study:
1, There might be only one HW timer.
2, Fine timer, normal timer and application timer are three different SW timers using the same HW timer.
Is normal timer identical to application timer?
3, Connection Idle timer can be considered as a SW timer under application timer.
In fact, there are some other SW timer under application timer. Refer to bleapp.h:
#define BLEAPP_APP_TIMER_ADV 0x1
#define BLEAPP_APP_TIMER_CONN_IDLE 0x2
#define BLEAPP_APP_TIMER_DIRECT_ADV 0x3
#define BLEAPP_APP_TIMER_SCAN 0x4
#define BLEAPP_APP_TIMER_CONN 0x5
So, ADV/CONN_IDLE_SCAN_CONN procedure will use the same SW timer but with different ID.
Is my understanding correct?
But what does it mean if emconinfo_getAppTimerId() return 0?
0 is not defined in bleapp.h.
thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I ran this past the developers today, and here is what they came back with:
1.
There are actually two HW timers, but one is used by the firmware exclusively.
2.
All timers mux off of the same system timer.
3.
These are used by the stack, so disregard references to them within bleapp.h:
#define BLEAPP_APP_TIMER_ADV 0x1
#define BLEAPP_APP_TIMER_CONN_IDLE 0x2
#define BLEAPP_APP_TIMER_DIRECT_ADV 0x3
#define BLEAPP_APP_TIMER_SCAN 0x4
#define BLEAPP_APP_TIMER_CONN 0x5
Yes on your understanding as noted at the bottom of item 3 above.
With regards to the last portion of your questions, emconinfo_getAppTimerId() is used by the stack, disregard.