<?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>GPIO IN_EVENT to GPIO PORT Event</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/25428/gpio-in_event-to-gpio-port-event</link><description>Hello,
I&amp;#39;m new to Nordic SDK and I would like to ask you for help with change of
GPIO IN_EVENT to GPIO PORT event implementation. The reason is we are using
revision &amp;lt; 3 and I need to decrease power consumption. 
 Current implementation is like following</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 May 2018 02:44:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/25428/gpio-in_event-to-gpio-port-event" /><item><title>RE: GPIO IN_EVENT to GPIO PORT Event</title><link>https://devzone.nordicsemi.com/thread/132853?ContentTypeID=1</link><pubDate>Wed, 23 May 2018 02:44:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5461d375-95d1-44ad-994a-e39362ebfaba</guid><dc:creator>Enzo</dc:creator><description>&lt;p&gt;sure&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO IN_EVENT to GPIO PORT Event</title><link>https://devzone.nordicsemi.com/thread/132717?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 10:42:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20082516-fcca-4030-b3c8-54140e167fe7</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi Enzo,&lt;/p&gt;
&lt;p&gt;Please create a new question/ticket for your issue:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/support/add"&gt;https://devzone.nordicsemi.com/support/add&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO IN_EVENT to GPIO PORT Event</title><link>https://devzone.nordicsemi.com/thread/132622?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 01:59:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb1dca1f-c218-49a0-a638-0a2c85e1b3d1</guid><dc:creator>Enzo</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I use&amp;nbsp;&lt;span&gt;custom 51822 board with sdk 12.3 and running nrf_nus sevice. I use port event to start uart peripheral so can lower power consumption. could you tell me the&amp;nbsp;Exact power consumption of port event. When i measure current consumption it will be&amp;nbsp;different when connect the configed port event pin to usb to ttl module or dsconnect it. i can&amp;#39;t get it&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO IN_EVENT to GPIO PORT Event</title><link>https://devzone.nordicsemi.com/thread/100226?ContentTypeID=1</link><pubDate>Tue, 03 Oct 2017 07:07:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f225f8b9-6149-4177-9063-f7d49ad7d4fc</guid><dc:creator>michael</dc:creator><description>&lt;p&gt;Thank you. This change is working :-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO IN_EVENT to GPIO PORT Event</title><link>https://devzone.nordicsemi.com/thread/100222?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2017 17:17:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bac624d-b5c7-462b-9601-eca494175fc5</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;I believe that if a port event is triggered on a low to high transition on a pin, a new port event can’t be triggered before that pin has gone low again or the pin is configured to sense low (which will trigger a new event on high to low transition). See the answers to &lt;a href="https://devzone.nordicsemi.com/question/38976/missing-interrupts-on-gpioe-port-events/"&gt;this&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/question/15696/nrf51822-sense-pin-in-port-mode-doesnt-solve-the-gpiote-overconsumption-in-event-mode/?comment=15962#comment-15962"&gt;this&lt;/a&gt; post.&lt;/p&gt;
&lt;p&gt;You could try to use the &lt;code&gt;GPIOTE_CONFIG_IN_SENSE_TOGGLE()&lt;/code&gt; instead.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO IN_EVENT to GPIO PORT Event</title><link>https://devzone.nordicsemi.com/thread/100225?ContentTypeID=1</link><pubDate>Tue, 26 Sep 2017 14:36:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a9ef4f3-bd79-41c7-83ff-51fdd7c6e26b</guid><dc:creator>michael</dc:creator><description>&lt;p&gt;First function is the one mentioned in the initial question. It&amp;#39;s also called first. Next three init functions are following:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;void init_gpio_acc()
{
  ret_code_t err_code;
  nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_LOTOHI(false);
  in_config.pull = NRF_GPIO_PIN_NOPULL;
  
  err_code = nrf_drv_gpiote_in_init(GPIO_AINT1, &amp;amp;in_config, pin_handler);
  APP_ERROR_CHECK(err_code);
  nrf_drv_gpiote_in_event_enable(GPIO_AINT1, false);  
}

void int_gpio_gyro()
{
  ret_code_t err_code;
  nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_LOTOHI(false);
  in_config.pull = NRF_GPIO_PIN_NOPULL;
  
  err_code = nrf_drv_gpiote_in_init(GPIO_GINT1, &amp;amp;in_config, pin_handler);
  APP_ERROR_CHECK(err_code);
  nrf_drv_gpiote_in_event_enable(GPIO_GINT1, false);
}

void int_gpio_comm()
{
  ret_code_t err_code;
  nrf_drv_gpiote_in_config_t dio0 = GPIOTE_CONFIG_IN_SENSE_LOTOHI(false);
  dio0.pull = NRF_GPIO_PIN_NOPULL;
  
  nrf_drv_gpiote_in_uninit(GPIO_DIO0);
  err_code = nrf_drv_gpiote_in_init(GPIO_DIO0, &amp;amp;dio0, dio_handler_isr);
  APP_ERROR_CHECK(err_code);
  nrf_drv_gpiote_in_event_enable(GPIO_DIO0, true);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If I use &lt;code&gt;.hi_accuracy&lt;/code&gt; set to &lt;code&gt;true&lt;/code&gt; the functionality is fine. When I change it to &lt;code&gt;false&lt;/code&gt; I receive just one interrupt and that&amp;#39;s all.&lt;/p&gt;
&lt;p&gt;Thank you for comment.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO IN_EVENT to GPIO PORT Event</title><link>https://devzone.nordicsemi.com/thread/100224?ContentTypeID=1</link><pubDate>Tue, 26 Sep 2017 09:24:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0bbd8a8-aac1-4957-9012-4d7c3954f5b1</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;You should not need to clear any interrupt flag yourself, the GPIOTE driver should take care of that for you.&lt;/p&gt;
&lt;p&gt;Could you post your &lt;code&gt;init_gpio_button()&lt;/code&gt; function where you use 4 inputs GPIOs ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO IN_EVENT to GPIO PORT Event</title><link>https://devzone.nordicsemi.com/thread/100227?ContentTypeID=1</link><pubDate>Mon, 25 Sep 2017 10:51:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77fbaa2a-1401-4fa8-82e6-8ee889fc703e</guid><dc:creator>michael</dc:creator><description>&lt;p&gt;Thank you I will have a look on the post.&lt;/p&gt;
&lt;p&gt;I have one more question. In case I have more than one input GPIOs, how the interrupt handling must be changed? In our implementation we have 4 input GPIOs and if change &lt;code&gt;.hi_accuracy&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; for all four GPIOs after I receive first interrupt, I don&amp;#39;t receive any else. Do I need to clear any interrupt flag?&lt;/p&gt;
&lt;p&gt;Thank you very much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO IN_EVENT to GPIO PORT Event</title><link>https://devzone.nordicsemi.com/thread/100223?ContentTypeID=1</link><pubDate>Mon, 25 Sep 2017 09:05:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33c28c89-5b7b-43ca-a55f-58553322da33</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;PS: If you need to decrease power consumption, take a look at &lt;a href="https://devzone.nordicsemi.com/question/5186/how-to-minimize-current-consumption-for-ble-application-on-nrf51822/"&gt;this post&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO IN_EVENT to GPIO PORT Event</title><link>https://devzone.nordicsemi.com/thread/100221?ContentTypeID=1</link><pubDate>Mon, 25 Sep 2017 09:01:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d0513b2-c39c-4b8d-b8a4-368619305c5f</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, if you set the &lt;code&gt;.hi_accuracy&lt;/code&gt; flag to true, then the GPIOTE will use IN event(consumes more current), but if you set the flag to false, the GPIOTE will use the PORT event (low accuracy mode, uses less current.) You don&amp;#39;t need to configure anything more than that, the GPIOTE driver takes care of the rest.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>