<?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 events without interrupts</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82349/gpiote-events-without-interrupts</link><description>I have impulses coming to a GPIO input. Each pulse (say: rising edge) should toggle some other&amp;#39;s GPIO output. What I know, is that I cat apply a task to a GPIO output. This task can toggle the output pin on each event automatically. There are many examples</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 13 Dec 2021 19:15:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82349/gpiote-events-without-interrupts" /><item><title>RE: GPIOTE events without interrupts</title><link>https://devzone.nordicsemi.com/thread/343270?ContentTypeID=1</link><pubDate>Mon, 13 Dec 2021 19:15:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bae9eff-6bb9-4c47-b32d-04bdfef84d0b</guid><dc:creator>KrzysztofS</dc:creator><description>&lt;p&gt;Than you. Your advice solved my problem.&lt;/p&gt;
&lt;p&gt;The purpose was to setup I2S-master interface with output clock divided by two (to emulate 64-bit frame). The code below does the task usinhh Event-Task mechanism. It &amp;quot;captures&amp;quot; output pin signal (in) and outputs it in twice slower rate at another pin (out).&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void gpiote_init (int in, int out)
{
    nrf_ppi_channel_t ppi_channel;

    int err_code = nrf_drv_ppi_init();
    APP_ERROR_CHECK(err_code);
    err_code = nrf_drv_ppi_channel_alloc (&amp;amp;ppi_channel);
    APP_ERROR_CHECK(err_code);

    nrfx_gpiote_init();

    nrfx_gpiote_in_config_t in_config = NRFX_GPIOTE_RAW_CONFIG_IN_SENSE_HITOLO (true);
    in_config.is_watcher = true;
    err_code = nrfx_gpiote_in_init (in, &amp;amp;in_config, NULL);
    APP_ERROR_CHECK(err_code);
    nrfx_gpiote_in_event_enable (in, false);

    const nrfx_gpiote_out_config_t out_config = NRFX_GPIOTE_CONFIG_OUT_TASK_TOGGLE (false);
    err_code = nrfx_gpiote_out_init (out, &amp;amp;out_config);
    APP_ERROR_CHECK(err_code);
    nrfx_gpiote_out_task_enable (out);

    err_code = nrfx_ppi_channel_assign (ppi_channel,
            nrfx_gpiote_in_event_addr_get (in),
            nrfx_gpiote_out_task_addr_get (out));
    APP_ERROR_CHECK(err_code);
    err_code = nrfx_ppi_channel_enable (ppi_channel);
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE events without interrupts</title><link>https://devzone.nordicsemi.com/thread/341764?ContentTypeID=1</link><pubDate>Fri, 03 Dec 2021 01:35:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:129420b7-a4c1-452e-ac51-0af2e1b47563</guid><dc:creator>Senchoi</dc:creator><description>&lt;p&gt;yes ppi does that. reading &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/34547/ppi-configuration-to-count-pulses/133136#133136"&gt;this&lt;/a&gt; and looking at the two sample code may help you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>