<?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>Long Delay between triggering GPIOTE event and his execution</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37044/long-delay-between-triggering-gpiote-event-and-his-execution</link><description>Hi 
 I use the nRF51 Development Kit and the pin_change_int example. 
 when i push the button the LED changes but there is a delay of 16us. 
 is this normal ? can i speed this up ? 
 
 Blue is the Button Signal 
 Red is the LED signal</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 01 Aug 2018 13:45:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37044/long-delay-between-triggering-gpiote-event-and-his-execution" /><item><title>RE: Long Delay between triggering GPIOTE event and his execution</title><link>https://devzone.nordicsemi.com/thread/142433?ContentTypeID=1</link><pubDate>Wed, 01 Aug 2018 13:45:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0dfc2e2-c923-4e22-8520-accba4a94f43</guid><dc:creator>Markus Aerni</dc:creator><description>&lt;p&gt;OK&amp;nbsp; with&amp;nbsp;&lt;/p&gt;
&lt;p&gt;nrf_gpio_pin_dir_set(ONEWIRE_DATA_PIN, GPIO_PIN_CNF_DIR_Output); // One Wire Direction output&lt;br /&gt; nrf_delay_us(60);&lt;br /&gt; nrf_gpio_cfg_sense_input(ONEWIRE_DATA_PIN, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_SENSE_LOW); // OneWire data Pin Input&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;all works !&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: Long Delay between triggering GPIOTE event and his execution</title><link>https://devzone.nordicsemi.com/thread/142377?ContentTypeID=1</link><pubDate>Wed, 01 Aug 2018 12:07:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aaa903f4-2003-4230-9686-1931703627ec</guid><dc:creator>Markus Aerni</dc:creator><description>&lt;p&gt;hmm OK&amp;nbsp;&lt;/p&gt;
&lt;p&gt;in my interrupt i do&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;LED_ON;&lt;/p&gt;
&lt;p&gt;nrf_gpio_pin_dir_set(ONEWIRE_DATA_PIN, GPIO_PIN_CNF_DIR_Output); // One Wire Direction output&lt;br /&gt;nrf_delay_us(60);&lt;br /&gt;nrf_gpio_pin_dir_set(ONEWIRE_DATA_PIN, GPIO_PIN_CNF_DIR_Input); // One Wire Direction Input&lt;/p&gt;
&lt;p&gt;LED_OFF;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;but after that the interrupt wont work again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long Delay between triggering GPIOTE event and his execution</title><link>https://devzone.nordicsemi.com/thread/142366?ContentTypeID=1</link><pubDate>Wed, 01 Aug 2018 11:44:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2894c93-6d3f-40b4-8a08-214a9f26f22e</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Yes, this will change the GPIO from input to an output. Do note that GPIOTE PORT (or IN[n] for that matter) only works if it&amp;#39;s an input.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long Delay between triggering GPIOTE event and his execution</title><link>https://devzone.nordicsemi.com/thread/142365?ContentTypeID=1</link><pubDate>Wed, 01 Aug 2018 11:42:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ee2c4d5-6504-4316-b4b8-94d1d0366cdf</guid><dc:creator>Markus Aerni</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks this works perfect !&lt;/p&gt;
&lt;p&gt;Much faster.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Just another question.&lt;/p&gt;
&lt;p&gt;is it possible to change direction with this pin configuration ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;nrf_gpio_cfg_sense_input(ONEWIRE_DATA_PIN, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_SENSE_LOW);&amp;nbsp; // OneWire data Pin&lt;/p&gt;
&lt;p&gt;as i did before&amp;nbsp; with ?&lt;/p&gt;
&lt;p&gt;nrf_gpio_pin_dir_set(ONEWIRE_DATA_PIN, GPIO_PIN_CNF_DIR_Output); // One Wire Direction output&lt;/p&gt;
&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Markus&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long Delay between triggering GPIOTE event and his execution</title><link>https://devzone.nordicsemi.com/thread/142330?ContentTypeID=1</link><pubDate>Wed, 01 Aug 2018 08:59:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71af35c3-4a97-483f-ac3b-2ffe5bbbc32d</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The interrupt latency for the Cortex M0 is 16 cycles == 1 us @ 16M.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The remainder of the time is processing in the nrf_drv_gpiote library (interrupt handler), as this library handles both PORT and IN[n] events. The PORT event uses the SENSE functionality, which is a level trigged signal, not a edge-trigged signal. In order to detect toggle operations, you emulate edge-triggering by inverting the SENSE (going from HIGH to LOW polarity), which may account for the processing time.&lt;/p&gt;
&lt;p&gt;You can switch to use the IN[n] events by setting &amp;quot;high accuracy&amp;quot; when configuring your pin, which shall decrease processing time needed:&amp;nbsp;GPIOTE_CONFIG_IN_SENSE_TOGGLE(true)&lt;/p&gt;
&lt;p&gt;GPIOTE IN[n] usage does use more current than the PORT event.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If this is too much of a jitter, I&amp;#39;d recommend that you implement GPIOTE PORT directly, like done here:&amp;nbsp;&lt;a href="https://github.com/NordicPlayground/nrf51-powerdown-examples/blob/master/system_on_wakeup_on_gpio/main.c"&gt;https://github.com/NordicPlayground/nrf51-powerdown-examples/blob/master/system_on_wakeup_on_gpio/main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>