<?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>ppi clearing of event flag</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/20138/ppi-clearing-of-event-flag</link><description>Hi,
Does the PPI module automatically clear the event flags for the linked event? For example, if I have the following: 
 NRF_PPI-&amp;gt;CH[0].EEP = (uint32_t)&amp;amp;(NRF_GPIOTE-&amp;gt;EVENTS_IN[0]);
NRF_PPI-&amp;gt;CH[0].TEP =(uint32_t) &amp;amp;(NRF_TIMER1-&amp;gt;TASKS_CLEAR);
NRF_PPI</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 03 Mar 2017 09:40:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/20138/ppi-clearing-of-event-flag" /><item><title>RE: ppi clearing of event flag</title><link>https://devzone.nordicsemi.com/thread/78411?ContentTypeID=1</link><pubDate>Fri, 03 Mar 2017 09:40:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8da8350-9b8e-4303-8a60-e5b0eae9b71e</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Good question Akbar,&lt;/p&gt;
&lt;p&gt;Look at this Figure that shows you the internal of how Peripheral interface is (a peripheral can be a TIMERx , RTC, RADIO etc)&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5584.Capture.JPG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;The event signal that goes to PPI is internal signal from the peripheral AND not the value of EVENT  register itself. If you just connect the PPI to the event of the peripheral then&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;if you have not enabled the interrupts then EVENT register of the peripheral is always set to 1 since you are not clearing it explicitly. But this does not matter because the PPI is using internal signal of the peripheral and it gets only pulses of events.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;if you have enabled interrupt for that event, then PPI will not clear the event register (since PPI is getting only a pulse of this event from the peripheral internal signal). The value of the EVENT register (not the internal signal) is the source for interrupt in ARM NVIC.  Here you need to explicitly clear the EVENT register, else your interrupt handler will run forever (as long as its interrupt priority will allow it to run).&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Is this clear?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>