<?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>NRF52832 Long GPIOTE Interrupt Delay - s132</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/65111/nrf52832-long-gpiote-interrupt-delay---s132</link><description>Hi everyone, 
 I modified example code ble_apps_bps and introduced a GPIO interrupt, I want to sniff I2c communication (bit banging) but my ISR is triggered with a very long latency. 
 For experimentation I am trying to sniff just only SCL line, when</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 Aug 2020 20:11:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/65111/nrf52832-long-gpiote-interrupt-delay---s132" /><item><title>RE: NRF52832 Long GPIOTE Interrupt Delay - s132</title><link>https://devzone.nordicsemi.com/thread/266328?ContentTypeID=1</link><pubDate>Tue, 25 Aug 2020 20:11:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5dc2ccb7-629f-4f56-aa20-8c0dbbc8653e</guid><dc:creator>boraciner</dc:creator><description>&lt;p&gt;I realized that when I read gpio in a while true loop I&amp;#39;m getting much much better results. So MCU is going into sleep mode .. now I will try to block it go into sleep&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 Long GPIOTE Interrupt Delay - s132</title><link>https://devzone.nordicsemi.com/thread/266325?ContentTypeID=1</link><pubDate>Tue, 25 Aug 2020 19:27:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3dca853-c91e-4a94-9cfe-500ce63c9ee2</guid><dc:creator>boraciner</dc:creator><description>&lt;p&gt;Thanks for your reply but actually I will process SDA SCL lines while listening to them via interrupts. PPI cannot help me because I will not try to toggle a led. Is there any other way to do it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 Long GPIOTE Interrupt Delay - s132</title><link>https://devzone.nordicsemi.com/thread/266222?ContentTypeID=1</link><pubDate>Tue, 25 Aug 2020 12:03:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e75b39d-28a7-4955-9b7e-9ba3c609039c</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I suggest using the GPIOTE + PPI directly instead as this offloads the CPU and is much faster than doing it purely based on event handlers in SW. Try something like this for setting the pin on a Low to high transition:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void gpiote_setup(void)
{
    uint32_t in_evt_addr;
    uint32_t gpiote_task_addr;
    nrf_ppi_channel_t ppi_channel;
    ret_code_t err_code;

    nrf_drv_gpiote_out_config_t config_out = GPIOTE_CONFIG_OUT_TASK_TOGGLE(true);
    nrf_drv_gpiote_in_config_t  config_in = GPIOTE_CONFIG_IN_SENSE_LOTOHI(false);

    err_code = nrf_drv_gpiote_out_init(GPIO_OUTPUT_PIN_NUMBER, &amp;amp;config_out);
    APP_ERROR_CHECK(err_code);

    err_code = nrf_drv_gpiote_in_init(GPIOTE_INPUT_PIN_NUMBER, &amp;amp;config_in,NULL);
    APP_ERROR_CHECK(err_code);


    err_code = nrf_drv_ppi_channel_alloc(&amp;amp;ppi_channel);
    APP_ERROR_CHECK(err_code);

    in_evt_addr = nrf_drv_gpiote_in_event_addr_get(GPIOTE_INPUT_PIN_NUMBER);
    gpiote_task_addr = nrf_drv_gpiote_out_task_addr_get(GPIO_OUTPUT_PIN_NUMBER);

    err_code = nrf_drv_ppi_channel_assign(ppi_channel, in_evt_addr, gpiote_task_addr);
    APP_ERROR_CHECK(err_code);

    err_code = nrf_drv_ppi_channel_enable(ppi_channel);
    APP_ERROR_CHECK(err_code);

    nrf_drv_gpiote_out_task_enable(GPIO_OUTPUT_PIN_NUMBER);
    nrf_drv_gpiote_in_event_enable(GPIOTE_INPUT_PIN_NUMBER, true);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>