<?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>How to Use RTC peripheral and GPIO pin as Wake-Up Sources in nRF7002DK (Zephyr)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119727/how-to-use-rtc-peripheral-and-gpio-pin-as-wake-up-sources-in-nrf7002dk-zephyr</link><description>Hi everyone, 
 I&amp;#39;ve been developing an application using the nRF7002DK, where the nRF5340 SoC communicates with the nRF7002 SoC to connect to a Wi-Fi network, retrieve a JSON object via an HTTP GET request, and execute some tasks before entering sleep</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 14 Mar 2025 12:42:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119727/how-to-use-rtc-peripheral-and-gpio-pin-as-wake-up-sources-in-nrf7002dk-zephyr" /><item><title>RE: How to Use RTC peripheral and GPIO pin as Wake-Up Sources in nRF7002DK (Zephyr)</title><link>https://devzone.nordicsemi.com/thread/527371?ContentTypeID=1</link><pubDate>Fri, 14 Mar 2025 12:42:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b37636fc-4866-4a84-9367-e4ae1ee29bd0</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;&lt;strong&gt;2. RTC as a wakeup&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;You can use kernel-based sleep APIs, such as k_msleep or k_sleep() functions. No need to add specific NRF_RTC libraries, as the kernel provides timing-based APIs.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;3. We do use zephyr rtos, which supports many architectures, so I fully understand your confusion here.&lt;/p&gt;
&lt;p&gt;Zephyr based samples often does not include a &amp;quot;requirement&amp;quot; section, as can be seen here on the basic/button sample (which includes APIs on how to wakeup from button press):&lt;/p&gt;
&lt;p&gt;&lt;a title="https://docs.nordicsemi.com/bundle/ncs-2.9.0-nrf54h20-rc1/page/zephyr/samples/basic/button/readme.html#button" href="https://docs.nordicsemi.com/bundle/ncs-2.9.0-nRF54H20-rc1/page/zephyr/samples/basic/button/README.html#button" rel="noopener noreferrer" target="_blank"&gt;https://docs.nordicsemi.com/bundle/ncs-2.9.0-nRF54H20-rc1/page/zephyr/samples/basic/button/README.html#button&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;while this sample works on almost all nRF-based boards, as long as &amp;quot;sw0&amp;quot; and &amp;quot;led0&amp;quot; is defined in the device tree, zephyr does not explicitly list which boards are supported.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;In NCS, we do this in our sample applications, as shown here in the bluetooth/peripheral_uart sample documentation:&lt;/p&gt;
&lt;p&gt;&lt;a title="https://docs.nordicsemi.com/bundle/ncs-2.9.0-nrf54h20-rc1/page/nrf/samples/bluetooth/peripheral_uart/readme.html#requirements" href="https://docs.nordicsemi.com/bundle/ncs-2.9.0-nRF54H20-rc1/page/nrf/samples/bluetooth/peripheral_uart/README.html#requirements" rel="noopener noreferrer" target="_blank"&gt;https://docs.nordicsemi.com/bundle/ncs-2.9.0-nRF54H20-rc1/page/nrf/samples/bluetooth/peripheral_uart/README.html#requirements&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Use RTC peripheral and GPIO pin as Wake-Up Sources in nRF7002DK (Zephyr)</title><link>https://devzone.nordicsemi.com/thread/527302?ContentTypeID=1</link><pubDate>Fri, 14 Mar 2025 06:21:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cca9c434-03c7-48a2-a2d1-c14aef4151bb</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;a.&amp;nbsp;&lt;strong&gt;GPIO as Wake-Up Source:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For configuring GPIO pin (for example: SW0) as a wake-up source, you need to configure GPIO with the SENSE mechanism. It is not enabled in zephyr by default for all GPIOs. You need to enable the sense edge mask in the device tree file.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;gpio0 {
    sense-edge-mask = &amp;lt;0xffffffff&amp;gt;; /* Enable PORT event for all pins on GPIO0 */
};&lt;/pre&gt;&lt;span&gt;Adding the sense-edge-mask property, which will make the GPIO driver use the GPIOTE PORT event rather than dedicated GPIOTE IN channels.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have found this case&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/108634/proper-configuration-of-gpio-irq-on-nrf52"&gt;(+) Proper configuration of GPIO IRQ on nRF52 - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone&lt;/a&gt;, which may help.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>