<?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>Migration to SDK15.1: NRFX GPIOTE IN EVENT</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37873/migration-to-sdk15-1-nrfx-gpiote-in-event</link><description>Hello, 
 I base on migration guide: 
 http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.1.0%2Fnrfx_migration_user_guide.html&amp;amp;cp=4_0_0_2_5 
 
 My board is nrf52840. 
 
 I have strange problem with migration to new NRFX</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 Aug 2018 18:30:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37873/migration-to-sdk15-1-nrfx-gpiote-in-event" /><item><title>RE: Migration to SDK15.1: NRFX GPIOTE IN EVENT</title><link>https://devzone.nordicsemi.com/thread/146589?ContentTypeID=1</link><pubDate>Thu, 30 Aug 2018 18:30:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4974e271-ba60-47c9-b198-73482d02a2d7</guid><dc:creator>Paweł</dc:creator><description>&lt;p&gt;I managed it. It turned out that I mistook some libraries - in many cases there are few locations for libraries with same names. I gave paths to wrong headers and it caused that program was baing compiled but tasks from GPIOTE did not work at all.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migration to SDK15.1: NRFX GPIOTE IN EVENT</title><link>https://devzone.nordicsemi.com/thread/146178?ContentTypeID=1</link><pubDate>Tue, 28 Aug 2018 20:56:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cbd2f31-c9fb-4235-a694-af3bd81f23e6</guid><dc:creator>Paweł</dc:creator><description>&lt;p&gt;I just pasted my functions to the example project (pin_change_int_pca_10056) and everything is ok. I do not understand what I have forgotten to configure in my own blank project. Is there any CPU/CLOCK or anything to configure to run IN EVENTS? I did not mention that I work with Segger Embedded Studio. Maybe I forgot something with IDE configuration?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am sorry if I am not precise enough, if yoy need more informations or files to be included, just say, please. I feel confused because cannot find any differences in configurations of example and mine.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migration to SDK15.1: NRFX GPIOTE IN EVENT</title><link>https://devzone.nordicsemi.com/thread/146176?ContentTypeID=1</link><pubDate>Tue, 28 Aug 2018 18:44:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e7b7304-8750-413d-9abd-5af5a97991f3</guid><dc:creator>Paweł</dc:creator><description>&lt;p&gt;Thank you for your fast response. Unfortunately, the code behaves as before. I included banch of libraries but there is no difference. I used also unchanged sdk_config.h.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I guess that I do not define something and this cause the problems even though program compiles. Could you please describe what is indispensible to make the program work on nrfx drivers? I mainly mean every needed defines because as I see the code is rather error-free?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migration to SDK15.1: NRFX GPIOTE IN EVENT</title><link>https://devzone.nordicsemi.com/thread/146101?ContentTypeID=1</link><pubDate>Tue, 28 Aug 2018 12:18:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5752ffb5-d854-44e4-84f6-6d8a73298f61</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please insert the code below into your project and check if it works. You can change LED_4 and&amp;nbsp;&amp;nbsp;BUTTON_1 to match the pinout of your board.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;stdbool.h&amp;gt;
#include &amp;lt;stdint.h&amp;gt;
#include &amp;quot;nrf.h&amp;quot;
#include &amp;quot;nrf_gpiote.h&amp;quot;
#include &amp;quot;nrf_gpio.h&amp;quot;
#include &amp;quot;boards.h&amp;quot;
#include &amp;quot;nrf_drv_gpiote.h&amp;quot;
#include &amp;quot;app_error.h&amp;quot;


void gpiote_callback(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
{
    if (pin == BUTTON_1)
    {
        nrfx_gpiote_out_task_trigger(LED_4); //toggle output on button press - can be done through PPI
    }
}


void gpiote_init()
{
    uint32_t                 err_code;
    nrfx_gpiote_out_config_t config_out = NRFX_GPIOTE_CONFIG_OUT_TASK_TOGGLE(true);
    nrfx_gpiote_in_config_t  config_in = NRFX_GPIOTE_CONFIG_IN_SENSE_HITOLO(true);

    config_in.pull = NRF_GPIO_PIN_PULLUP;

    err_code = nrfx_gpiote_init();
    APP_ERROR_CHECK(err_code);
    
    err_code = nrfx_gpiote_out_init(LED_4, &amp;amp;config_out);
    APP_ERROR_CHECK(err_code);

    nrfx_gpiote_out_task_enable(LED_4);

    err_code = nrfx_gpiote_in_init(BUTTON_1, &amp;amp;config_in, gpiote_callback);
    APP_ERROR_CHECK(err_code);

    nrfx_gpiote_in_event_enable(BUTTON_1, true);
    
}

/**
 * @brief Function for application main entry.
 */
int main(void)
{
   
    gpiote_init();


    while (true)
    {
        // Do Nothing - GPIO can be toggled without software intervention.
    }
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>