<?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>GPIOTE IN Event not triggering PPI task</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/32943/gpiote-in-event-not-triggering-ppi-task</link><description>I am trying to time a capacitor discharge through different resistance sensors for greater resolution than an ADC. I did this using the GPIO functions initially but the SD will sometimes interfere and cause the readings to be off. I have decided to try</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 04 Apr 2018 18:18:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/32943/gpiote-in-event-not-triggering-ppi-task" /><item><title>RE: GPIOTE IN Event not triggering PPI task</title><link>https://devzone.nordicsemi.com/thread/126916?ContentTypeID=1</link><pubDate>Wed, 04 Apr 2018 18:18:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2ea4504-9ab1-446e-b6d5-031189e54728</guid><dc:creator>digitalnyx</dc:creator><description>&lt;p&gt;Of course it had to be that simple.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE IN Event not triggering PPI task</title><link>https://devzone.nordicsemi.com/thread/126867?ContentTypeID=1</link><pubDate>Wed, 04 Apr 2018 13:33:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ca995ed-2ade-4108-bd37-33a8da8e93c9</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;I would think the problem is that the GPIOTE event address is assigned to the PPI channel before the GPIOTE IN event is intialized. I would think you should do something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// 1) Initialize the sense line (gpiote):

// Initialize and enable then sense line (high to low)
  sense_cfg.pull = NRF_GPIO_PIN_NOPULL;
  nrf_drv_gpiote_in_init(TEMP_SENSE_LINE, &amp;amp;sense_cfg, sense_dummy_handler);


// 2) Assign the initialized GPIOTE event to a PPI channel.

// Configure a PPI channel to stop the discharge timer whenever a sense line goes low
  nrf_drv_ppi_channel_alloc(&amp;amp;ppi_2);
  nrf_drv_ppi_channel_assign(ppi_2, 
                             nrf_drv_gpiote_in_event_addr_get(TEMP_SENSE_LINE), 
                             nrf_drv_timer_task_address_get(&amp;amp;discharge_timer, NRF_TIMER_TASK_CAPTURE0));
  
  ....&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also, remember to check and handle all error codes!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>