<?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>[nRF54L15 DK][Zephyr] How to implement deep sleep + interrupt-driven wakeup?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/124089/nrf54l15-dk-zephyr-how-to-implement-deep-sleep-interrupt-driven-wakeup</link><description>Hello, 
 I am exploring power management on the nRF54L15 DK with nRF Connect SDK v2.8.0 (Zephyr v3.7.99) . 
 My goal is to: 
 
 
 Enter deep sleep / system off mode. 
 
 
 Wake up on an external GPIO interrupt ( Interrupt from LSM6DSL IMU Sensor). 
 </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 03 Sep 2025 10:54:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/124089/nrf54l15-dk-zephyr-how-to-implement-deep-sleep-interrupt-driven-wakeup" /><item><title>RE: [nRF54L15 DK][Zephyr] How to implement deep sleep + interrupt-driven wakeup?</title><link>https://devzone.nordicsemi.com/thread/547612?ContentTypeID=1</link><pubDate>Wed, 03 Sep 2025 10:54:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08e641e9-9a43-4b18-b2e2-21844611e827</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hi Vishnu,&lt;/p&gt;
&lt;p&gt;When it comes to power off, I believe that might be a bit different on the 54L15. We have a bit about &lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf54L15/page/pmu.html#ariaid-title4"&gt;that here&lt;/a&gt;, and &lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf54L15/page/grtc.html#d762e570"&gt;here&lt;/a&gt;&amp;nbsp;for instance, though this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/119042/system-off-mode-for-system-power-management-for-nrf54l15/523498"&gt;quick sample mentioned by a colleague of mine&lt;/a&gt; might be more helpful.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And regarding having a pin wake-up, have a look at this other quick example I made for a customer earlier, that I think should also work for the nRF54L15&amp;nbsp;as well. You might have to add&amp;nbsp;&lt;span&gt;target_include_directories&lt;/span&gt;&lt;span&gt;(app PRIVATE hal) to cmakelists&amp;nbsp;to run it.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/drivers/gpio.h&amp;gt;


#include &amp;lt;hal/nrf_gpio.h&amp;gt;
#include &amp;lt;hal/nrf_power.h&amp;gt;
#include &amp;lt;hal/nrf_regulators.h&amp;gt;

/* 1000 msec = 1 sec */
#define SLEEP_TIME_MS   1000

/* The devicetree node identifier for the &amp;quot;led0&amp;quot; alias. */
#define LED0_NODE DT_ALIAS(led0)

/* The devicetree node identifier for the &amp;quot;sw0&amp;quot; alias (button0). */
#define SW0_NODE DT_ALIAS(sw0)

/*
 * A build error on this line means your board is unsupported.
 * See the sample documentation for information on how to fix this.
 */
static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios);
static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET(SW0_NODE, gpios);

int main(void)
{
	int ret;
	int iterate=0;
	int naptime = 6;
	bool led_state = true;
	printk(&amp;quot;Count down to System OFF mode: T-%d blinks\n&amp;quot;, naptime/2);

	if (!gpio_is_ready_dt(&amp;amp;led)) {
		return 0;
	}

	if (!gpio_is_ready_dt(&amp;amp;button)) {
		printk(&amp;quot;Error: button device %s is not ready\n&amp;quot;, button.port-&amp;gt;name);
		return 0;
	}

	ret = gpio_pin_configure_dt(&amp;amp;led, GPIO_OUTPUT_ACTIVE);
	if (ret &amp;lt; 0) {
		return 0;
	}

	ret = gpio_pin_configure_dt(&amp;amp;button, GPIO_INPUT);
	if (ret &amp;lt; 0) {
		printk(&amp;quot;Error %d: failed to configure %s pin %d\n&amp;quot;,
		       ret, button.port-&amp;gt;name, button.pin);
		return 0;
	}

	/* Configure the button pin for wake-up on low signal (button press) */
	nrf_gpio_cfg_sense_set(button.pin, NRF_GPIO_PIN_SENSE_LOW);

	while (iterate &amp;lt; naptime) {
		ret = gpio_pin_toggle_dt(&amp;amp;led);
		if (ret &amp;lt; 0) {
			return 0;
		}
		iterate++;

		led_state = !led_state;
		printf(&amp;quot;LED state: %s\n&amp;quot;, led_state ? &amp;quot;ON&amp;quot; : &amp;quot;OFF&amp;quot;);
		k_msleep(SLEEP_TIME_MS);
	}

	printk(&amp;quot;Entering sleep mode...\n&amp;quot;);
	/* Enter sleep mode */
	nrf_regulators_system_off(NRF_REGULATORS);

	return 0;
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
[quote user=""]wakeup-source[/quote]
&lt;p&gt;I am not that familiar with the&amp;nbsp;&lt;span&gt;wakeup-source property, but I do not think it does much by itself.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>