<?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 problems</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16147/gpiote-problems</link><description>Hi, 
 My SDK version:9.0
SD:8.0 
 I use gpiote to generate an interrupt, 
 static void bma255_int_hook(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
{
 g_int1_triggered = true; 
}

uint32_t bma255_int_pin_set(void)
{
 uint32_t	err_code;</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Sep 2016 10:01:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16147/gpiote-problems" /><item><title>RE: GPIOTE problems</title><link>https://devzone.nordicsemi.com/thread/61588?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2016 10:01:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddac6671-eabc-4d6b-a17b-c71e463bb342</guid><dc:creator>Frank</dc:creator><description>&lt;p&gt;Hi, Stefan
Sorry for my mistake, I can detect the interrupt actually, but the period is not 16ms as the graph above shows, it&amp;#39;s about 1s. This is a HUGE deviation. Anyway, I can reach the lowest comsumption when use the sensor, but it cannot match well with nrf51822.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE problems</title><link>https://devzone.nordicsemi.com/thread/61587?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2016 07:15:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fab789b4-4db5-42b0-9d11-0f82ad0a928c</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;For further explanation, check the discussion on &lt;a href="https://devzone.nordicsemi.com/question/84653/run-currentresources-with-gpiote-event-nrf52/"&gt;this thread&lt;/a&gt;. I find it strange though that you do not detect any interrupt when using the GPIOTE PORT event. If you have softdevice enabled, you could miss an interrupt once in a while but not all the time, as BLE events are periodic but not constant.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE problems</title><link>https://devzone.nordicsemi.com/thread/61586?ContentTypeID=1</link><pubDate>Mon, 05 Sep 2016 09:22:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3de51ef-8dc6-49f1-860a-5fb2073d0332</guid><dc:creator>Frank</dc:creator><description>&lt;p&gt;Thank you. I&amp;#39;ve checked the interrupt priority, it is always set to high, but this question still occurs.From your answer, it seems no efficient way to solve this problem. I can only make the interrupt duration longer than maybe 500us, right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE problems</title><link>https://devzone.nordicsemi.com/thread/61585?ContentTypeID=1</link><pubDate>Fri, 02 Sep 2016 17:17:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9cd2d33-c00d-49cd-a825-62ec9844373a</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Make sure the gpiote interrupt priority is set to high, i.e. that APP_IRQ_PRIORITY_HIGH is set for GPIOTE in the nrf_drv_config.h file.&lt;/p&gt;
&lt;p&gt;The current consumpion difference you see is normal. Current consumption when using high accuracy is ~1mA, while the low accuracy gpiote uses &amp;lt;1uA. When using low accuracy, the GPIOTE PORT event is used. The PORT event does not know which pin caused the interrupt, but needs to check the status of pins in the interrupt handler to conclude what pin caused the interrupt. If the CPU is blocked by a higher priority interrupt, e.g. BLE interrupt when the signal occurs, then the GPIOTE interrupt handler in the nrf_drv_gpiote does not detect any pin signal, and the application interrupt is not called. BLE interrupts can block the CPU up to 500us, and therefore potentially delay the GPIOTE interrupt by 500us. If you have another interrupt executing at high priority as well, that will also block execution of the GPIOTE handler.&lt;/p&gt;
&lt;p&gt;You could check if the nrf_drv_gpiote driver actually gets the GPIOTE port interrupt by placing a breakpoint at the beginning of the GPIOTE_IRQHandler.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>