<?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 get task address</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17169/gpiote-get-task-address</link><description>In the nrf_drv_gpiote in SDK 11.0, I can only find a function to get the address of the out task for a gpiote channel. Shouldn&amp;#39;t there be a similar function to get the addresses of the set and clear tasks, or am I missing something?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 21 Oct 2016 17:17:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17169/gpiote-get-task-address" /><item><title>RE: gpiote get task address</title><link>https://devzone.nordicsemi.com/thread/65968?ContentTypeID=1</link><pubDate>Fri, 21 Oct 2016 17:17:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d73d9ca-7cd6-4bf3-8b8f-8760c0c6dcc8</guid><dc:creator>Morgan Jones</dc:creator><description>&lt;p&gt;I ran across this same problem and also noticed that the nrf_drv_gpio_ driver doesn&amp;#39;t address those set and clr tasks. I just managed to successfully use this as a way to get those addresses:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint32 pin_out_task_addr = nrf_drv_gpiote_out_task_addr_get(PIN_OUT);    
uint32 pin_set_task_addr = pin_out_task_addr + 0x30;
uint32 pin_clear_task_addr = pin_out_task_addr + 0x60;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ie, just adding the register offsets from here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fgpiote.html&amp;amp;cp=2_2_0_20_3&amp;amp;anchor=topic"&gt;infocenter.nordicsemi.com/index.jsp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s not a perfect method, but is working great for me.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gpiote get task address</title><link>https://devzone.nordicsemi.com/thread/65967?ContentTypeID=1</link><pubDate>Thu, 20 Oct 2016 10:35:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:545feef9-99cc-468e-bd93-9d6be9a462ed</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Can you post an example of how you do it with entering the address manually? And explain in more detail what you try to achieve?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gpiote get task address</title><link>https://devzone.nordicsemi.com/thread/65966?ContentTypeID=1</link><pubDate>Wed, 19 Oct 2016 15:26:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24cc8c5e-7ac1-41a7-b870-dbb820f5ae66</guid><dc:creator>bds</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;as I understand these functions, nrf_drv_gpiote_out_task_addr_get() gives the address of the OUT task. And the OUT task can be configured to toggle, set or clear a pin. But there are also dedicated SET and CLR tasks with their own address for PPI usage. I need these addresses in PPI to configure different events triggering set and clear tasks through the same GPIOTE channel. This seems to work if I enter the addresses manually, but I could&amp;#39;nt find any function to get these addresses in the SDK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gpiote get task address</title><link>https://devzone.nordicsemi.com/thread/65965?ContentTypeID=1</link><pubDate>Wed, 19 Oct 2016 15:08:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9d75113-5d54-4cdf-b0ef-aab9b1837c8e</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The function &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/group__nrf__drv__gpiote.html#ga96aaf7f75de940b10df541121d887da0"&gt;&lt;code&gt;nrf_drv_gpiote_out_task_addr_get()&lt;/code&gt;&lt;/a&gt; return the address of the task, which you can use to configure &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/ppi.html?cp=2_2_0_21#concept_sxf_21l_1s"&gt;PPI&lt;/a&gt; or control the task manually. You can take a look at the function &lt;code&gt;led_blinking_setup()&lt;/code&gt; in the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/nrf_gpiote_example.html?cp=4_0_0_4_5_10"&gt;GPIOTE example&lt;/a&gt;. Here GPIOTE is used to connect a timer to a GPIO port, using PPI, to toggle a LED. Toggle is selected by configuring the GPIOTE pin using  &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/group__nrf__drv__gpiote.html#ga67406eeba1e7a962e3426683b111bc1e"&gt;&lt;code&gt;GPIOTE_CONFIG_OUT_TASK_TOGGLE&lt;/code&gt;&lt;/a&gt;. It would also have been possible to set or clear the GPIO by configuring the pin using &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/group__nrf__drv__gpiote.html#ga1eb3f9e621a1479382a798b8ba827be8"&gt;&lt;code&gt;GPIOTE_CONFIG_OUT_TASK_LOW&lt;/code&gt;&lt;/a&gt; or &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/group__nrf__drv__gpiote.html#ga3ac1cae4b38f1684d6c43a27e0243d0a"&gt;&lt;code&gt;GPIOTE_CONFIG_OUT_TASK_HIGH&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>