<?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>Latency measurement/log</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40391/latency-measurement-log</link><description>Hi, all. I would like some serious help. I have three nRF52840 boards and have been running all the examples from the blinky to light switch/dimming. I am, however, stuck as to how i can send (arbitrary/advert) packets between these and get a log of the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 12 Nov 2018 14:23:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40391/latency-measurement-log" /><item><title>RE: Latency measurement/log</title><link>https://devzone.nordicsemi.com/thread/156916?ContentTypeID=1</link><pubDate>Mon, 12 Nov 2018 14:23:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb932b0a-4072-4404-a210-615ddac1ae19</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Rorisang,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You would need to use&amp;nbsp;acknowledged messages for your purpose.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In our light switch example we use that message when sending &amp;quot;reliable publish&amp;quot; message, please check&amp;nbsp;generic_onoff_client_set() function.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When there is a status message response to the reliable publish message, the function status_handle() in generic_onoff_client.c will be called.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can calculate the latency by starting a timer when you send the reliable message and stop it when you receive the status call back.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Latency measurement/log</title><link>https://devzone.nordicsemi.com/thread/156909?ContentTypeID=1</link><pubDate>Mon, 12 Nov 2018 14:07:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1413c2fa-3990-459b-94d9-0138518bc62e</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;The radio events are clearly spelled out in the nRF specification.&amp;nbsp; events_address occurs immediately after reception an address. Although the event clock would be p_clock (16MHz), since the radio phy is either 1 or 2 MHz you should consider the resolution of this event to be about +/-0.5usec since the phy symbols are up to 1usec long and with the Gaussian filtering they don&amp;#39;t have a hard edge like digital signals.&lt;/p&gt;
&lt;p&gt;However, that event won&amp;#39;t do you a lot of good since you can&amp;#39;t interrupt into your code while the softdevice is working.&amp;nbsp; At best you could route the event to gpiote and do something with it there.&lt;/p&gt;
&lt;p&gt;Likely a better way to handle your question is with a mix of BLE and custom protocol.&amp;nbsp; By timeslotting some custom protocol comms in with the BLE work you can use the radio to synchronize itself in a system and thereby discover your latency.&amp;nbsp; The same rules apply that basic error will be about +/-0.5usec but at least it is feasible.&lt;/p&gt;
&lt;p&gt;Nordic published a really nice time sync solution.&amp;nbsp; You can read about it here: &lt;a href="https://devzone.nordicsemi.com/b/blog/posts/wireless-timer-synchronization-among-nrf5-devices"&gt;devzone.nordicsemi.com/.../wireless-timer-synchronization-among-nrf5-devices&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>