<?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 event not coming</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63944/gpiote-event-not-coming</link><description>I have enable 4 Low power events for 4 button in NRF52832 board. when i press a button board is waking up due to low power event 
 but when it is waiting in low power mode using sequence __sev(); __wfe(); __wfe(); events are not coming. 
 if i enable</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 17 Aug 2020 06:21:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63944/gpiote-event-not-coming" /><item><title>RE: GPIOTE event not coming</title><link>https://devzone.nordicsemi.com/thread/264725?ContentTypeID=1</link><pubDate>Mon, 17 Aug 2020 06:21:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67f0b35a-6b2a-4a4e-b975-17df3a3b761c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;You need to set the INTENSET register to enable wakeup as Dmitry has pointed out. Otherwise, the GPIOTE event register is not going to be connected to anything (see &lt;span class="item"&gt;&lt;a class="" title="Peripheral interface" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/peripheral_interface.html?cp=4_2_0_14#concept_twz_bpz_vr"&gt;Peripheral interface&lt;/a&gt;&lt;/span&gt;). You also need to enable SEVONPEND and mask the interrupt if you really need to trigger wakeup without servicing an ISR.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE event not coming</title><link>https://devzone.nordicsemi.com/thread/263741?ContentTypeID=1</link><pubDate>Mon, 10 Aug 2020 05:00:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07d7ce6d-5557-47f1-9523-0b443fb147ac</guid><dc:creator>Surya</dc:creator><description>&lt;p&gt;no, my case is different. anybody tried my code in nrf52832 board?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE event not coming</title><link>https://devzone.nordicsemi.com/thread/263356?ContentTypeID=1</link><pubDate>Thu, 06 Aug 2020 08:09:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73aa28fb-a76e-4b81-90b1-6f42752196ed</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;Maybe&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/19286/port-event-not-waking-up-with-interrupts-disabled"&gt;this&lt;/a&gt;&amp;nbsp;topic will be helpful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE event not coming</title><link>https://devzone.nordicsemi.com/thread/262691?ContentTypeID=1</link><pubDate>Mon, 03 Aug 2020 05:35:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03380814-dbff-487f-bf70-a4dbc54b0537</guid><dc:creator>Surya</dc:creator><description>&lt;p&gt;I added the above mention line of code in gpio_init(), but no use. I am not getting any events when I press a button in the system on mode.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE event not coming</title><link>https://devzone.nordicsemi.com/thread/262665?ContentTypeID=1</link><pubDate>Sat, 01 Aug 2020 19:54:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df614f92-3af0-439d-a7d3-67e786d80a30</guid><dc:creator>Dmitry</dc:creator><description>[quote userid="71007" url="~/f/nordic-q-a/63944/gpiote-event-not-coming/262632"]the same sequence is being used in all examples. [/quote]
&lt;p&gt;The sev/wfe/wfe sequence saves some power when waiting for interrupt, but in case of waiting-for-event loop, you will lose an event if it comes while CPU is active.&lt;/p&gt;
&lt;p&gt;I forgot to mention that SEVONPEND flag should be enabled to wake up on any events, including ones disabled in NVIC:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;SCB-&amp;gt;SCR |= SCB_SCR_SEVONPEND_Msk;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span&gt;I played with such method for bit-banging protocol&amp;nbsp;some time ago and found it unreliable (sometimes device didn&amp;#39;t wake up when it should). For button handling, I don&amp;#39;t see any advantage over traditional interrupt-based method.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE event not coming</title><link>https://devzone.nordicsemi.com/thread/262632?ContentTypeID=1</link><pubDate>Sat, 01 Aug 2020 04:50:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c47f456-c2bd-41a2-b994-ece392151e4d</guid><dc:creator>Surya</dc:creator><description>&lt;p&gt;the same sequence is being used in all examples. anyway I checked with the order you mentioned but it is not waiting for an event, immediately going to gpio_check() again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE event not coming</title><link>https://devzone.nordicsemi.com/thread/262603?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 13:56:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26252488-d877-4903-bf22-cd041a46e4da</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;__SEV();&lt;br /&gt; __WFE();&lt;br /&gt; __WFE();&lt;/p&gt;
&lt;p&gt;it seems should be different&amp;nbsp;order:&amp;nbsp;&lt;span&gt;__WFE();&amp;nbsp;__SEV();&amp;nbsp;__WFE();&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE event not coming</title><link>https://devzone.nordicsemi.com/thread/262588?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 13:06:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7fb969c2-3209-4333-ba9f-3bbcf05ad708</guid><dc:creator>Surya</dc:creator><description>&lt;p&gt;i added below lin of code&amp;nbsp;&lt;/p&gt;
&lt;p&gt;NRF_GPIOTE-&amp;gt;INTENSET = GPIOTE_INTENSET_PORT_Set &amp;lt;&amp;lt; GPIOTE_INTENSET_PORT_Pos;&lt;/p&gt;
&lt;p&gt;to gpio_init() but still event is not coming.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE event not coming</title><link>https://devzone.nordicsemi.com/thread/262550?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 11:21:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:913b2999-e253-404c-aa86-6f10a1255aa2</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;Yes, PORT interrupt should be enabled in NRF_GPIOTE-&amp;gt;INTENSET to wake up on that event. If you don&amp;#39;t want to use an interrupt, just don&amp;#39;t enable it in NVIC.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE event not coming</title><link>https://devzone.nordicsemi.com/thread/262528?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 08:48:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a3c0cee-d64c-4586-8f9a-8a5478fe4c34</guid><dc:creator>Jared</dc:creator><description>[quote user="Surya"]GPIOTE event will be generated when I press a button (as per my configuration) and is working if I goto system_off mode. but when the system is on, the GPIOTE event is not coming. do you mean to say GPIOTE events will not come in system_on condition?[/quote]
&lt;p&gt;&amp;nbsp;no, that&amp;#39;s not what I meant. I can see that your program does somewhat what you intended it to do. But there is a better way to make nRF do something based on what button that is pressed ( See the BSP example).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Surya"] do you mean to say GPIOTE events will not come in system_on condition?[/quote]
&lt;p&gt;&amp;nbsp;From the product specification:&lt;/p&gt;
&lt;div&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;PORT is an event that can be generated from multiple input pins using the GPIO DETECT signal.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The event will be generated on the rising edge of the DETECT signal. See&amp;nbsp;&lt;a title="The general purpose input/output (GPIO) is organized as one port with up to 32 I/Os (dependent on package) enabling access and control of up to 32 pins through one port. Each GPIO can be accessed individually." href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/gpio.html#concept_zyt_tcb_lr"&gt;GPIO — General purpose input/output&lt;/a&gt;&amp;nbsp;for more information about the DETECT signal.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Putting the system into System ON IDLE while DETECT is high will not cause DETECT to wake the system up again. Make sure to clear all DETECT sources before entering sleep. If the LATCH register is used as a source, if any bit in LATCH is still high after clearing all or part of the register (for instance due to one of the PINx.DETECT signal still high), a new rising edge will be generated on DETECT, see&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/gpio.html#concept_o12_bgv_bs"&gt;Pin configuration&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Trying to put the system to System OFF while DETECT is high will cause a wakeup from System OFF reset.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;This feature is always enabled although the peripheral itself appears to be IDLE, that is, no clocks or other power intensive infrastructure have to be requested to keep this feature enabled. This feature can therefore be used to wake up the CPU from a WFI or WFE type sleep in System ON with all peripherals and the CPU idle, that is, lowest power consumption in System ON mode.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;In order to prevent spurious interrupts from the PORT event while configuring the sources, the user shall first disable interrupts on the PORT event (through INTENCLR.PORT), then configure the sources (PIN_CNF[n].SENSE), clear any potential event that could have occurred during configuration (write &amp;#39;1&amp;#39; to EVENTS_PORT), a&lt;strong&gt;nd finally enable interrupts (through INTENSET.PORT)&amp;quot;.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The interrupt has to be enabled for it to work.&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE event not coming</title><link>https://devzone.nordicsemi.com/thread/262511?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 07:51:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9bb27f7d-db33-4a1e-927b-bde6eecf21fa</guid><dc:creator>Surya</dc:creator><description>&lt;p&gt;hi Jared,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t understand &amp;quot;&lt;span&gt;This is surely not the intended way of using the GPIOTE peripheral.&amp;nbsp;&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;GPIOTE event will be generated when I press a button (as per my configuration) and is working if I goto system_off mode. but when the system is on, the GPIOTE event is not coming. do you mean to say GPIOTE events will not come in system_on condition? &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;or&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;GPIOTE will only work to wakeup system from off?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE event not coming</title><link>https://devzone.nordicsemi.com/thread/262440?ContentTypeID=1</link><pubDate>Thu, 30 Jul 2020 13:56:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b6d6ffe-8610-4708-9125-4f24004886c5</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;This is surely not the intended way of using the GPIOTE peripheral. The whole idea of GPIOTE is to automatically do tasks based on events without involving the CPU.&amp;nbsp;I suggest looking at the BSP example, it does somewhat what you&amp;#39;re trying to do and implements IDLE sleep.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE event not coming</title><link>https://devzone.nordicsemi.com/thread/262277?ContentTypeID=1</link><pubDate>Thu, 30 Jul 2020 05:08:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa5551dd-4dc5-4836-936c-c73af03c60c9</guid><dc:creator>Surya</dc:creator><description>&lt;p&gt;thanks for your reply.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have provided a simple code. in that, I enabled 4&amp;nbsp;GPIOTE events.&lt;/p&gt;
&lt;p&gt;if i am going to systemoff instead of waiting in low power mode&amp;nbsp;&lt;span&gt;NRF52832&amp;nbsp;is waking up.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Q1.can&amp;nbsp; GPIOTE events cant&amp;nbsp;make&amp;nbsp;NRF52832&amp;nbsp;come out of low power mode?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Q2. GPIOTE events won&amp;#39;t come when system_on condition?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE event not coming</title><link>https://devzone.nordicsemi.com/thread/262214?ContentTypeID=1</link><pubDate>Wed, 29 Jul 2020 13:16:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b301a6f-e5eb-47ed-9186-20b6e403ca0d</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;[quote user=""][/quote]&lt;/p&gt;
&lt;p&gt;if i enable GPIOTE IRQ interrupt, i am getting the interrupts&amp;nbsp;in low power mode but I don&amp;#39;t want use interrupts.&lt;/p&gt;
&lt;div&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-filesystemfile/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-c2c595c73e2b43a4a08643415ea675ab/main.c?_=637308311555111489"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;What do you mean? How does this differ from what you want to achieve? I&amp;#39;m not sure I understand the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>