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). */
    
  • Hi Stefan I did as you advised, I changed the connection intervals as shown below. Is there a way I can further increase the frequency?

     #define HEART_RATE_MEAS_INTERVAL         APP_TIMER_TICKS(5, APP_TIMER_PRESCALER) /**< Heart     rate measurement interval (ticks)CHANGED from 1000. */
     #define MIN_CONN_INTERVAL                MSEC_TO_UNITS(8, UNIT_1_25_MS)           /**< 100 from 400  Minimum acceptable connection interval (0.4 seconds). */
    #define MAX_CONN_INTERVAL                MSEC_TO_UNITS(15, UNIT_1_25_MS)
    
Reply
  • Hi Stefan I did as you advised, I changed the connection intervals as shown below. Is there a way I can further increase the frequency?

     #define HEART_RATE_MEAS_INTERVAL         APP_TIMER_TICKS(5, APP_TIMER_PRESCALER) /**< Heart     rate measurement interval (ticks)CHANGED from 1000. */
     #define MIN_CONN_INTERVAL                MSEC_TO_UNITS(8, UNIT_1_25_MS)           /**< 100 from 400  Minimum acceptable connection interval (0.4 seconds). */
    #define MAX_CONN_INTERVAL                MSEC_TO_UNITS(15, UNIT_1_25_MS)
    
Children
No Data
Related