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

APP_TIMER_TICKS with different PRESCALER

Hi Nordic,

From the topic: APP_TIMER_TICKS value, I've know how to use it, but is it possible to use different prescaler value in the same code?

For example the nRF5_SDK_12.0.0_12f24da\examples\ble_peripheral\ble_app_hrs\main.c:

#define APP_TIMER_PRESCALER              0
#define BATTERY_LEVEL_MEAS_INTERVAL      APP_TIMER_TICKS(2000, APP_TIMER_PRESCALER)
#define HEART_RATE_MEAS_INTERVAL         APP_TIMER_TICKS(1000, APP_TIMER_PRESCALER)

Can I change the macro like below?

#define APP_TIMER_PRESCALER1              0
#define APP_TIMER_PRESCALER2              1000
#define BATTERY_LEVEL_MEAS_INTERVAL      APP_TIMER_TICKS(2000, APP_TIMER_PRESCALER1)
#define HEART_RATE_MEAS_INTERVAL         APP_TIMER_TICKS(1, APP_TIMER_PRESCALER2)

Is the above work normal when calling app_timer_start()?

Thanks.

Related