<?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>Start 2 timers in 1 instructions? (nRF52)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/32868/start-2-timers-in-1-instructions-nrf52</link><description>Hi all! 
 TL;DR 
 Is there a way to start 2 timers in 1 instructions ? (or to synchronize them afterward?) 
 
 - - - 
 Background 
 I need to take 8 timestamps of GPIO edges using PPI events/tasks (more explanations here ). 
 This needs 2 timers as they</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 22 May 2018 09:40:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/32868/start-2-timers-in-1-instructions-nrf52" /><item><title>RE: Start 2 timers in 1 instructions? (nRF52)</title><link>https://devzone.nordicsemi.com/thread/132701?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 09:40:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60868066-b0c3-44d9-87d8-e21ed513a3c4</guid><dc:creator>Cedric Honnet</dc:creator><description>&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For those interested, the chosen solution was to start the timers and reset them together using PPI and forks.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;code is available on this repo:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/HiveTracker/PPI"&gt;https://github.com/HiveTracker/PPI&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;...and&amp;nbsp;which was mostly developed to be used here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/HiveTracker/firmware"&gt;https://github.com/HiveTracker/firmware&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Start 2 timers in 1 instructions? (nRF52)</title><link>https://devzone.nordicsemi.com/thread/127252?ContentTypeID=1</link><pubDate>Fri, 06 Apr 2018 14:59:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d976739-4552-434b-970d-0c54368bd7a3</guid><dc:creator>Rune Holmgren</dc:creator><description>&lt;p&gt;The &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fegu.html&amp;amp;cp=2_1_0_45&amp;amp;anchor=concept_x4j_fx1_lr"&gt;Event Generator Unit&lt;/a&gt;&amp;nbsp;is exactly what you are looking for.&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><item><title>RE: Start 2 timers in 1 instructions? (nRF52)</title><link>https://devzone.nordicsemi.com/thread/127031?ContentTypeID=1</link><pubDate>Thu, 05 Apr 2018 12:22:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b390c52-c2eb-4a0f-b21d-4740ba7993ca</guid><dc:creator>Cedric Honnet</dc:creator><description>&lt;p&gt;OK, thanks anyway ;)&lt;br /&gt;Last&amp;nbsp;question if I may: is there a way to trigger these tasks manually? (a bit like a software&amp;nbsp;event)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Start 2 timers in 1 instructions? (nRF52)</title><link>https://devzone.nordicsemi.com/thread/127001?ContentTypeID=1</link><pubDate>Thu, 05 Apr 2018 10:53:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1923f76-a04c-43e2-840e-0455d97129ed</guid><dc:creator>Rune Holmgren</dc:creator><description>&lt;p&gt;Sorry, it doesn&amp;#39;t seem like we have any examples which use FORK. You will have to make due with the PPI documentation, but as far as I can tell FORK is pretty straightforward so I think you will be fine.&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><item><title>RE: Start 2 timers in 1 instructions? (nRF52)</title><link>https://devzone.nordicsemi.com/thread/126987?ContentTypeID=1</link><pubDate>Thu, 05 Apr 2018 09:17:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8330ebe-2dd0-4011-b896-ef9215fafc4f</guid><dc:creator>Cedric Honnet</dc:creator><description>&lt;p&gt;Sorry, &lt;a href="https://github.com/HiveTracker/ppi_test"&gt;PPI is OK&lt;/a&gt;, I was asking if you had FORK examples ;)&lt;/p&gt;
&lt;p&gt;Thanks again!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Start 2 timers in 1 instructions? (nRF52)</title><link>https://devzone.nordicsemi.com/thread/126971?ContentTypeID=1</link><pubDate>Thu, 05 Apr 2018 07:45:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bdbaca8-309e-4262-b0e1-165654141ebd</guid><dc:creator>Rune Holmgren</dc:creator><description>&lt;p&gt;In the nRF5 SDK you can find a reasonably simple PPI example in the folder &amp;quot;nRF5_SDK_15.0.0_a53641a/examples/peripheral/ppi&amp;quot;. That is a good starting point to see an implementation utilizing PPI if you haven&amp;#39;t seen it already. Other than that you can search in the SDK and find other examples using PPI to see &amp;quot;real&amp;quot; applications using it.&lt;/p&gt;
&lt;p&gt;Hoping that may be of help.&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><item><title>RE: Start 2 timers in 1 instructions? (nRF52)</title><link>https://devzone.nordicsemi.com/thread/126908?ContentTypeID=1</link><pubDate>Wed, 04 Apr 2018 16:09:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff5b0441-c738-4feb-888d-ae68fe142526</guid><dc:creator>Cedric Honnet</dc:creator><description>&lt;p&gt;Thanks a lot, Rune!&lt;br /&gt;&lt;a href="https://github.com/HiveTracker/ppi_test/blob/master/PPI.cpp#L61-L86"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been playing a bit with PPI and the fork feature was actually my next exploration plan.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My current test uses PPI in a fairly simple way:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/HiveTracker/ppi_test/blob/master/PPI.cpp#L61-L86"&gt;https://github.com/HiveTracker/ppi_test/blob/master/PPI.cpp#L61-L86&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;...and it&amp;#39;s using Nordic&amp;#39;s lib, so I guess I could use the fork wrapper too:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/HiveTracker/ppi_test/blob/master/nRF_SDK/nrf_ppi.h#L234-L265"&gt;https://github.com/HiveTracker/ppi_test/blob/master/nRF_SDK/nrf_ppi.h#L234-L265&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is there any&amp;nbsp;easy&amp;nbsp;example that you would recommend to understand its use better?&lt;/p&gt;
&lt;p&gt;Thanks again ;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Start 2 timers in 1 instructions? (nRF52)</title><link>https://devzone.nordicsemi.com/thread/126907?ContentTypeID=1</link><pubDate>Wed, 04 Apr 2018 15:53:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb05bd15-9319-48a8-bdab-9cc130a0848e</guid><dc:creator>Rune Holmgren</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The first idea using PPI seems like the best way to do this. PPI supports a feature called &amp;quot;FORK&amp;quot; which enable you to cause a single event to start two timers. This will allow you to start both of the timers at the same time and not end up with a one CPU clock cycle offset.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/654x473/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-4f776f7c8969408499bdce5e0dd69227/fork.PNG" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;While PPI may seem a bit complicated it often turns out to be the far simplest solution when you need precise concurrency. (It&amp;#39;s also very low power compared to using the CPU)&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>