<?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>Embedding GPIOTE module in TWI example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/41045/embedding-gpiote-module-in-twi-example</link><description>Hello, another question from me :) First of all, I&amp;#39;m working with Eclipse, GCC compiler and SDK 15.2.0. I want to add GPIOTE funtionality to the TWI example of Nordic. I&amp;#39;m not quit sure which module to use. I found one GPIOTE module under libraries/gpiote</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 03 Dec 2018 09:48:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/41045/embedding-gpiote-module-in-twi-example" /><item><title>RE: Embedding GPIOTE module in TWI example</title><link>https://devzone.nordicsemi.com/thread/159918?ContentTypeID=1</link><pubDate>Mon, 03 Dec 2018 09:48:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f1a33c8-e697-4879-8d29-73f9c001ac26</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Happy to help, let me know if you run into any other issues &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Embedding GPIOTE module in TWI example</title><link>https://devzone.nordicsemi.com/thread/159736?ContentTypeID=1</link><pubDate>Fri, 30 Nov 2018 14:34:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fa08ce9-7c19-4c9a-bc71-66e651d9af1c</guid><dc:creator>Sascha Schmidt</dc:creator><description>&lt;p&gt;Thank you very much, that clears a lot for me!!&lt;/p&gt;
&lt;p&gt;Kind regards&lt;/p&gt;
&lt;p&gt;Sascha&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Embedding GPIOTE module in TWI example</title><link>https://devzone.nordicsemi.com/thread/159684?ContentTypeID=1</link><pubDate>Fri, 30 Nov 2018 11:33:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7475dd2-8fdd-4367-bcf2-e308c484ef91</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi Sascha,&lt;/p&gt;
&lt;p&gt;I understand it can be a bit confusing. The app_gpiote.h is from the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Flib_gpiote.html&amp;amp;cp=4_0_0_3_19"&gt;GPIOTE handling library,&lt;/a&gt; which uses the GPIOTE driver.&amp;nbsp; But as you can see in the documentation page this library is obsolete and should not be used in new designs. The advice is to use the drivers directly. &lt;/p&gt;
&lt;p&gt;About the drivers now, we have just migrated from our old drivers (nrf_drv) to the new drivers (nrfx). We still have a legacy layer which serves as a wrapper for the new nrfx drivers, see &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fgroup__nrf__drv__gpiote.html"&gt;GPIO driver - legacy layer&lt;/a&gt;. Please read more about the migration to the nrfx drivers &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fnrfx_migration_user_guide.html&amp;amp;resultof=%22%6e%72%66%78%22%20%22%6d%69%67%72%61%74%69%6f%6e%22%20%22%6d%69%67%72%61%74%22%20"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As a warning you should know that the legacy layer will not be supported in future SDK releases. But in SDK v15.2.0 we still recommend using the legacy layer wrapper, see the documentation for the GPIO driver &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fhardware_driver_gpiote.html&amp;amp;cp=4_0_0_2_0_3"&gt;here&lt;/a&gt;, but you can easily use the nrfx driver directly without going through the legacy layer by taking a look at the forwardings to the new implementation &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fgroup__nrf__drv__gpiote.html&amp;amp;anchor=ga00970227fc2c393fbbc71b3d362b58c2"&gt;here&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;The legacy layer driver is located in:&lt;/p&gt;
&lt;p&gt;integration\nrfx\legacy\nrf_drv_gpiote.h&lt;/p&gt;
&lt;p&gt;And the nrfx driver is located in:&lt;/p&gt;
&lt;p&gt;modules\nrfx\drivers\include\nrfx_gpiote.h&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Second question:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Use the GPIOTE driver instead of the library. In sdk_config.h you need to enable both the nrf_dvr_gpiote driver and the nrfx_gpiote regardless of what you choose to use. Do not set the old GPIOTE_ENABLED entry to 0, see the note in the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fnrfx_migration_user_guide.html&amp;amp;cp=4_0_0_2_5_1&amp;amp;anchor=getting_started_replace_nrf_drv_options_migrate"&gt;migration guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I hope this provide some clarity. It is a bit confusing because of the migration. I think maybe the easiest way would be to use the legacy layer and follow the steps in the documentation. Try to build the GPIOTE example from the SDK and you can see how the legacy driver is wrapping the nrfx driver. The example is located in examples/peripherals/gpiote&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>