2 Replies Latest reply on Jan 7, 2015 3:10 PM by MichaelF_56 Branched to a new discussion.

    Timer in 2073x

      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)




              ble_trace0("profile:idletimer stopped");



      I'm a little confused about these timers.

      Can someone clarify?

      thanks a lot

        • 1. Re: Timer in 2073x

          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.



          • 2. Re: Timer in 2073x

            I ran this past the developers today, and here is what they came back with:



            There are actually two HW timers, but one is used by the firmware exclusively.



            All timers mux off of the same system timer.



            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.


            VikramR_26 jota_1939431