<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>how to make Battery Level updates 100 times per second?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34355/how-to-make-battery-level-updates-100-times-per-second</link><description>Dear Sir/Madam, 
 
 I am playing with SDK12.2 on PCA10028 board and runs its HRS example. This example has a battery service and its battery level characteristic could update its value at about 2 second interval which is controlled by an application timer</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 May 2018 08:10:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34355/how-to-make-battery-level-updates-100-times-per-second" /><item><title>RE: how to make Battery Level updates 100 times per second?</title><link>https://devzone.nordicsemi.com/thread/131972?ContentTypeID=1</link><pubDate>Tue, 15 May 2018 08:10:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9ff1fcc-277b-406f-a153-ce49c42fcdbe</guid><dc:creator>Rune Holmgren</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The example has its range of connection intervals defined in main.c on line 79 and 80 as follows:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define MIN_CONN_INTERVAL                MSEC_TO_UNITS(400, UNIT_1_25_MS)            /**&amp;lt; Minimum acceptable connection interval (0.4 seconds). */
#define MAX_CONN_INTERVAL                MSEC_TO_UNITS(650, UNIT_1_25_MS)            /**&amp;lt; Maximum acceptable connection interval (0.65 second). */&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This means that regardless of the speed you queue notifications, the notifications are only sent every 0.4 - 0.65 seconds. You will need to reduce the conn interval to get higher frequency, but be aware that Bluetooth low energy only goes down to 7.5 ms. If you need higher refresh rates than this you need to collect multiple measurements and send them together in packages. Also note that the central device may have different conn params it wants to use, and may not always support 7.5ms. E.g. if the device connects to an Android phone which only does 30ms updates on BLE your conn params update request may be rejected if you set both max and min to 7.5ms.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Rune Holmgren&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>