This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

APP_ADV_INTERVAL and APP_ADV_DURATION

Hi, 

I'm trying to look for a definition for the APP_ADV_DURATION and APP_ADV_INTERVAL. 


#define APP_ADV_INTERVAL                300                                    /**< The advertising interval (in units of 0.625 ms. This value corresponds to 187.5 ms). 
#define APP_ADV_DURATION                18000                                  /**< The advertising duration (180 seconds) in units of 10 milliseconds. 

How does we know the value we set is in units of 0.625ms or 10ms ?

Can anyone teach me? or guide me any module shall I look into?

Parents
  • Hi Kathleen

    Sorry about the confusion, but I see what you mean now.

    All timer units are by default in ms (milliseconds). However, as you can see in I.E. the ble_app_blinky example in the MIN_CONN_INTERVAL define, you can convert them to units of your choice by way of the MSEC_TO_UNITS() function. APP_ADV_INTERVAL and DURATION are not possible to edit though and have these units for a reason.

    In conclusion, timers that are defined by you, will by default be stated in units of 1ms, unless you convert them using the MSEC_TO_UNITS() function. 

  • Oh so grateful U get what I want. 

    I found if I  #define MYTIME_INTERVAL  3000 (with interval word) this will be in units of 0.625 ms.

    with duration word , it will be in units of 10ms.

Reply Children
Related