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

Issue changing the frequency of heart rate update in heart rate Monitor Example App for nrf51 DK

Hi, I wanted o increase the frequency at which heart rate is updated. So I made the following change

 #define HEART_RATE_MEAS_INTERVAL         APP_TIMER_TICKS(300, APP_TIMER_PRESCALER) /**< Heart rate measurement interval (ticks)CHANGED from 1000 to 300. */

On the app (hrm nrf toolbox), I can see bpm updating faster but is there a way to updae the graph as well.It still plots value at 1 s interval.

Where else should I make a change?

Parents
  • Hi Manu

    To get a faster update rate in nRFToolbox, you need to both change the HEART_RATE_MEAS_INTERVAL as you have mentioned, but you also need to adjust the BLE connection interval. Try to set the following constants in the ble_app_hrs example:

    #define BATTERY_LEVEL_MEAS_INTERVAL      APP_TIMER_TICKS(100, APP_TIMER_PRESCALER) /**< Battery level measurement interval (ticks). */
    #define MIN_CONN_INTERVAL                MSEC_TO_UNITS(100, UNIT_1_25_MS)       /**< Minimum acceptable connection interval (0.4 seconds). */
    #define MAX_CONN_INTERVAL                MSEC_TO_UNITS(250, UNIT_1_25_MS)       /**< Maximum acceptable connection interval (0.65 second). */
    
  • The frequency depends on two things; the connection interval and how often you actually tell the stack to send a notification to the central. The connection interval is dictated by the the central device, the min and max connection interval is only given to the central as guidance. You should try to figure out what connection interval you actually have, please see this thread for how to do that.

Reply Children
No Data
Related