<?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>Timer measurement using PPI on nRF51822</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35187/timer-measurement-using-ppi-on-nrf51822</link><description>Hi All 
 I&amp;#39;m trying to measure the Ton and the Toff of a signal present on an input pin of a nRF51822. 
 The idea is to use PPI, Timer 1 and save timer on every falling/rising edge of the input pin into CC[3] 
 I wrote a simple code , attached below,</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Jun 2018 13:33:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35187/timer-measurement-using-ppi-on-nrf51822" /><item><title>RE: Timer measurement using PPI on nRF51822</title><link>https://devzone.nordicsemi.com/thread/135183?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 13:33:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8bf17d4-3b56-4c03-8976-457c6e3b373f</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have not studied your code in details, but it seems that the PPI stuff is up an running, so the value of the timer should be stored in CC[3]. However, you will not get an interrupt from the timer task endpoint, so you must generate the interrupt from GPIOTE. There is nothing doing that in the code you have included. Assuming you use SDK 12.3 and continue to use the driver for GPIOTE, you enable interrupts with &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.3.0/group__nrf__drv__gpiote.html?cp=4_0_6_6_6_4_0_15#gaa5908dc17e228373065e966a0159dfd2"&gt;nrf_drv_gpiote_in_init()&lt;/a&gt;. The interrupt will be handled by the driver, which will call the event handler that you registered with&amp;nbsp;nrf_drv_gpiote_in_init().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>