2 Replies Latest reply on May 23, 2015 12:36 AM by prayook Branched from an earlier discussion.

    More appFineTimer questions...

      Continuation of this thread: More appFineTimer questions...

       

      I saw 12.5 ms in the comment above bleprofile_regTimerCb() function and it confused me.

       

      If I set fine_timer_interval as 12, what will be the actual interval? 12 or 12.5 ms?

       

      If I really want the interval to be 12.5 to make it perfectly fit in every 1 second, how can I config it?

        • 1. Re: More appFineTimer questions...

          Hello Prayook,

           

          Which value have you tried - 12 or 12.5?

           

          Thanks

          JT

          • 2. Re: More appFineTimer questions...

            Hi JT,

             

            Because fine_timer_interval is UINT16, 12.5 will not fit in the variable.

             

            I've tested the length of one fine interval using bleapputils_currentNativeBtClk and bleapputils_BtClksSince.

            I have found that the interval will always be floored to multiple of 12.5 ms.

             

            For example,

            If the value of fine_timer_interval is in the range of 1 - 24, the actual interval will be 12.5 ms.

            For the range of 25 - 37, the actual interval will be 25 ms.

            For the range of 38 - 49, the actual interval will be 37.5 ms.

             

            This is a bit tricky. If you put 37.5 in the fine_timer_interval. The actual interval you get will be 25 ms.

             

            Thanks,

            Koon