<?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 limmited to 8 interrupt pins</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64689/gpiote-limmited-to-8-interrupt-pins</link><description>hello Nordic 
 
 i am using nrf52832, sdk 16.0, 
 
 i have a system which need to react to multiple external interrupts on multiple pins 
 i see that when &amp;#39; nrf_drv_gpiote_in_init( ... )&amp;#39; is called more then 8 times i fall because the &amp;#39; channel_port_alloc</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 14 Aug 2020 14:45:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64689/gpiote-limmited-to-8-interrupt-pins" /><item><title>RE: gpiote limmited to 8 interrupt pins</title><link>https://devzone.nordicsemi.com/thread/264656?ContentTypeID=1</link><pubDate>Fri, 14 Aug 2020 14:45:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65fb13bf-80c4-4142-bafc-30272e1b8d87</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Ziv&lt;/p&gt;
&lt;p&gt;The second argument enables interrupt on this pin, which triggers the callback function you can register&amp;nbsp;when calling the&amp;nbsp;nrf_drv_gpiote_in_init(..) function.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In other words, if you want to run some code as a result of this pin getting activated you can use this function.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gpiote limmited to 8 interrupt pins</title><link>https://devzone.nordicsemi.com/thread/264407?ContentTypeID=1</link><pubDate>Thu, 13 Aug 2020 09:32:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9b9b3ab-9059-44ba-9066-62235374f326</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;ok great&amp;nbsp;&lt;/p&gt;
&lt;p&gt;thanks Ovrebekk&lt;/p&gt;
&lt;p&gt;one last question on this matter, in the enable gpiote function:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;nrf_drv_gpiote_in_event_enable(SOME_PIN, true);&lt;/p&gt;
&lt;p&gt;what is the meaning of the second argument true/false ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gpiote limmited to 8 interrupt pins</title><link>https://devzone.nordicsemi.com/thread/264392?ContentTypeID=1</link><pubDate>Thu, 13 Aug 2020 08:52:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82172dfe-11b4-46b2-a235-8a2c9c3f3ab2</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Ziv&lt;/p&gt;
&lt;p&gt;1. As I mentioned below, when you use the GPIOTE driver the only difference between initializing a pin for a PORT or IN event is whether or not you set the hi_accuracy field in the config to true or not.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When using the config macros it is even easier. Below I put an example of configuring to use either the PORT or IN event:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrf_drv_gpiote_in_config_t config_port = GPIOTE_CONFIG_IN_SENSE_TOGGLE(false);
err_code = nrf_drv_gpiote_out_init(10, &amp;amp;config_port);
APP_ERROR_CHECK(err_code);

nrf_drv_gpiote_in_config_t config_in = GPIOTE_CONFIG_IN_SENSE_TOGGLE(true);
err_code = nrf_drv_gpiote_out_init(11, &amp;amp;config_in);
APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;2. Yes, you can combine up to 8 high accuracy pins with as many low accuracy (PORT) pins as you like.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To enable several PORT pins just initialize several pins with hi_accuracy set to false, like shown in my code above.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gpiote limmited to 8 interrupt pins</title><link>https://devzone.nordicsemi.com/thread/264275?ContentTypeID=1</link><pubDate>Wed, 12 Aug 2020 13:04:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48dc03e2-a273-4f00-a357-11f834079757</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hi Ovrebekk&lt;/p&gt;
&lt;p&gt;thanks for replay&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;1. Regarding using the PORT, i have read all the theory but i can not find a code example or the correct API to use to do that&lt;/p&gt;
&lt;p&gt;2. i want to use 6 pins as GPIOTE with a channel for each pin cause i may get a lot of rapid interrupts on those pins&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i have another 4 pins which will probably not cause to many interrupts and i would like to use those with the PORT, so i did not understand from your replay if i can combine the 2 methods ??&lt;/p&gt;
&lt;p&gt;and how can i implement or see an implementation of the using of PORT method with several pins ??&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;best Regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gpiote limmited to 8 interrupt pins</title><link>https://devzone.nordicsemi.com/thread/264271?ContentTypeID=1</link><pubDate>Wed, 12 Aug 2020 12:51:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3dd78913-47be-4f6a-966c-6b946762ad94</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Ziv&lt;/p&gt;
&lt;p&gt;There are essentially two ways to register interrupts from pins in the nRF52 series:&lt;/p&gt;
&lt;p&gt;1) One way is to use the PORT event of the GPIOTE which connects to any pin with SENSE enabled. The advantage of this method is that all the pins in the device can act as wakeup/interrupt sources, but all of them will trigger the same event. This means that you have to manually read the state of the pins to see which of them was actually activated, which is impractical if you expect very frequent pin activations.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2) The second way is to use one of the GPIOTE IN channels to connect to one pin specifically, which gives you a unique event for this pin only. This allows you to more easily track pins that can change rapidly, but limits you to the number of GPIOTE channels in your device (8 for the nRF52832).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For a complete description of this please have a look at the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/gpiote.html?cp=4_2_0_20#concept_knz_kww_lr"&gt;GPIOTE specification in the product specification&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When using the GPIOTE driver choosing between method 1 and 2 is as easy as setting the hi_accuracy field in the config struct. Setting it to true uses a dedicated IN channel, while setting this false means you will be using the PORT event.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For any pin where you expect less rapid changes (like a button) you can set hi_accuracy to false, while up to 8 pins that are more rapidly used can be set true.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;[quote user=""][/quote]&lt;/p&gt;
&lt;p&gt;one more thing, can this 2 below work together with no unexpected issues ?&lt;/p&gt;
&lt;p&gt;#include &amp;quot;nrf_drv_gpiote.h&amp;quot;&lt;br /&gt;#include &amp;quot;app_gpiote.h&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You can include both of them, but if you are using the functions defined in app_gpiote.h you should not call any of the nrf_drv_gpiote functions defined in nrf_drv_gpiote.h.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The app_gpiote module uses the nrf_drv_gpiote module under the hood, and&amp;nbsp;you could get unpredictable behavior if you use both modules from the application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>