<?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>Microsecond timer for nRF52</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/19875/microsecond-timer-for-nrf52</link><description>Hello, 
 I would like to implement a precise timer which calculates/counts the time in microseconds which I can use for
calculating the time elapsed between parts of the code.
The timer just needs to run continously and start over once it overflows</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 24 Feb 2017 09:52:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/19875/microsecond-timer-for-nrf52" /><item><title>RE: Microsecond timer for nRF52</title><link>https://devzone.nordicsemi.com/thread/77324?ContentTypeID=1</link><pubDate>Fri, 24 Feb 2017 09:52:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f841c48-cd65-49ff-8b4d-c1b13a22c056</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Yes, you may get latency when the softdevice is active (when there is BLE event) and need to occupy the CPU, same when you have any flash activity. The TIMER is still running property, but the CPU may be delayed to serve the interrupt handler.&lt;/p&gt;
&lt;p&gt;However, we provided some solutions to overcome this, one is to use radio notification. You can use the radio notification to know that the softdevice will not be active after the event, at least for a period of time (dozens of miliseconds depends on your connection interval). Another option is to use timeslot&lt;/p&gt;
&lt;p&gt;How often do you need to measure code processing time ?  Can measuring be done by PPI and CAPTURE task (so no CPU be involved) or it must the CPU be involved ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Microsecond timer for nRF52</title><link>https://devzone.nordicsemi.com/thread/77323?ContentTypeID=1</link><pubDate>Fri, 24 Feb 2017 06:49:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f126b805-9940-45ca-abed-d514fae81e15</guid><dc:creator>Jan Lundskov</dc:creator><description>&lt;p&gt;Thanks for your reply.
I have now searched the forum for more information about the TIMER and the nrf_drv_timer driver and I can see that someone mentions, that the timers are not accurate, when a softdevice is used in the application. Is that correct?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Microsecond timer for nRF52</title><link>https://devzone.nordicsemi.com/thread/77322?ContentTypeID=1</link><pubDate>Tue, 21 Feb 2017 13:50:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1deb232e-bc56-4d61-8721-6b122f156821</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;You can use the TIMER, a TIMER on the nRF52 running on 16MHz clock so the lowest resolution is 62,5 nanosecond, it should be easy to count microseconds. You can use the CAPTURE task to capture the value of the timer. You can use the TIMER directly or use our nrf_drv_timer provided in the SDK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>