<?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>Capture Address and End event in timer0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/6514/capture-address-and-end-event-in-timer0</link><description>Hi, 
 What is the minimum time needed between two capture tasks for the same CC register? 
 I would like to timestamp the Address and End event of a packet in the same TIMER0-&amp;gt;CC register.
Currently I have setup the PPI to do this but if I do a readout</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 Apr 2015 13:25:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/6514/capture-address-and-end-event-in-timer0" /><item><title>RE: Capture Address and End event in timer0</title><link>https://devzone.nordicsemi.com/thread/22741?ContentTypeID=1</link><pubDate>Wed, 15 Apr 2015 13:25:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a5f8076-042a-4cac-8bf9-ed259d0f743d</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi CR,&lt;/p&gt;
&lt;p&gt;There is no minimum time needed between two capture tasks for the same CC register, as it does not take any time from the task_trigged to capture into CC. Which means that in the way you have configured your PPI, these two events can happen just one timer tick away to have two different values captured.&lt;/p&gt;
&lt;p&gt;There is one catch though, the CPU takes time to read your captured value in the handler (say Tus) and your events must happen atleast Tus away to allow the CPU to read twice without interruption from same timer interrupt handler. If not that distance apart then the below might happen.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;entered interrupt due to Address Event&lt;/li&gt;
&lt;li&gt;after clearing the event register but before reading CC[0] value End event occured&lt;/li&gt;
&lt;li&gt;now you read the CC[0] value in the handler caused by End event and return.&lt;/li&gt;
&lt;li&gt;returned to interrupt handler that was caused by Address Event which will now read the latest captured CC value (caused by END event)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Just use two different CC registers to capture.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>