<?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>NRF52840 DONGLE NCS 2.7.0 LOW POWER MODE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116652/nrf52840-dongle-ncs-2-7-0-low-power-mode</link><description>I&amp;#39;m trying to activate low power mode without success. I found samples but it appears not to work with the last NCS version. I want to get basic GPIO INPUT values at 32khz timer resolution. I get values with GPIO interruption during 100ms and send an</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Nov 2024 11:19:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116652/nrf52840-dongle-ncs-2-7-0-low-power-mode" /><item><title>RE: NRF52840 DONGLE NCS 2.7.0 LOW POWER MODE</title><link>https://devzone.nordicsemi.com/thread/512084?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2024 11:19:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dfe40b70-6561-4e7a-8a7d-17b85b3ebfed</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi krypton76,&lt;/p&gt;
[quote user="krypton76"]&lt;p&gt;The fact that i think it&amp;#39;s deprectated is discussed here : &lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/108749/can-t-enable-has_pm-to-support-power-management-notification"&gt;devzone.nordicsemi.com/.../can-t-enable-has_pm-to-support-power-management-notification&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And in the&amp;nbsp;NRF KCONFIG GUI&amp;nbsp;i can&amp;#39;t activate it : i can&amp;#39;t check&amp;nbsp;system power managment checkbox&lt;/p&gt;
&lt;p&gt;And in the IDE i have the message : CONFIG_PM was assigned the value y, but got the value n. Missing dependencies:&lt;/p&gt;
&lt;p&gt;(SOC_SERIES_EFR32BG22 &amp;amp;&amp;amp; SOC_VENDOR_SILABS) || (SOC_SERIES_EFR32BG27 &amp;amp;&amp;amp; SOC_VENDOR_SILABS) || (SOC_SERIES_EFR32MG24 &amp;amp;&amp;amp; SOC_VENDOR_SILABS) || (SYS_CLOCK_EXISTS &amp;amp;&amp;amp; HAS_PM)&lt;/p&gt;[/quote]
&lt;p&gt;Ah right. nRF52840 does not support the PM subsystem, evident by the lack of the HAS_PM Kconfig, which is what preventing you from setting CONFIG_PM. So, the PM subsystem isn&amp;#39;t deprecated, but the&amp;nbsp;nRF52 series doesn&amp;#39;t support it.&lt;/p&gt;
&lt;p&gt;Instead, you just have two sleep mode. System ON Idle is automatically entered when all threads go into idle, and System OFF is entered using &lt;a href="https://docs.nordicsemi.com/bundle/zephyr-apis-2.8.0/page/group_sys_poweroff.html#gaf4552a8ea40b4adb94f85b0a1ff06e39"&gt;sys_poweroff()&lt;/a&gt;, enabled with &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.8.0/page/kconfig/index.html#CONFIG_POWEROFF"&gt;CONFIG_POWEROFF&lt;/a&gt;.&lt;/p&gt;
[quote user="krypton76"]Get GPIO state on/off on a pin by interrupt reading. I need to get the time spent between 2 high state interrupts, in order to calculate the frequency of the input signal.&lt;br /&gt;It is from 2000hz to 5000hz, for what i count tics spent between 2 interrupts events on the 32khz clock[/quote]
&lt;p&gt;I recommend using the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.8.0/page/zephyr/kernel/services/timing/clocks.html"&gt;Kernel Timing&lt;/a&gt;&amp;nbsp;of the Zephyr RTOS for this. The system tick is based off a RTC running in 32kHz by default. The value you get from the &lt;a href="https://docs.nordicsemi.com/bundle/zephyr-apis-2.8.0/page/group_clock_apis.html"&gt;k_uptime_*&lt;/a&gt; APIs are all from the RTC.&lt;/p&gt;
&lt;p&gt;This has the benefit of not necessitate the&amp;nbsp;running and control of a second RTC.&lt;/p&gt;
[quote user="krypton76"]Id do that for 100ms, i get at the end the average of frequencies, i send it by radio to third application then i go to deep sleep for 900ms and need a wake up by a timer.[/quote]
&lt;p&gt;I am afraid&amp;nbsp;the deepest sleep you can achieve with this requirement is System ON Idle. In System OFF mode, all timers are stopped, so you cannot wake up by time.&lt;/p&gt;
[quote user="krypton76"]For some reason if i plug in the dongle in an USB port the consomption raise up to 2mA.&lt;br /&gt;SB2 is cut, CB1 soldiered. If i only put the device in USB port (without power it wit PKK) it can&amp;#39;t put the device in bootloader mode.[/quote]
&lt;p&gt;I honestly am not well versed in the USB hardware, so I am not sure what could be happening here. Let&amp;#39;s revisit it if this remains a concern after our next steps.&lt;/p&gt;
[quote user="krypton76"]If i just put&amp;nbsp;&lt;p&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;main&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;while&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;i get 2.91 mA&lt;/div&gt;&lt;/div&gt;[/quote]
&lt;p&gt;In this setup, the main thread stays active forever in the&amp;nbsp;infinite loop.&lt;/p&gt;
&lt;p&gt;You need to either let the main() function returns, or put it to sleep forever with&amp;nbsp;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;k_sleep(K_FOREVER)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 DONGLE NCS 2.7.0 LOW POWER MODE</title><link>https://devzone.nordicsemi.com/thread/511972?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2024 17:00:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:668d120c-e7f2-46ac-a284-d7a1f9f5217c</guid><dc:creator>krypton76</dc:creator><description>&lt;p&gt;Hello and thanks for you reply.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;The fact that i think it&amp;#39;s deprectated is discussed here : &lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/108749/can-t-enable-has_pm-to-support-power-management-notification"&gt;devzone.nordicsemi.com/.../can-t-enable-has_pm-to-support-power-management-notification&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And in the&amp;nbsp;NRF KCONFIG GUI&amp;nbsp;i can&amp;#39;t activate it : i can&amp;#39;t check&amp;nbsp;system power managment checkbox&lt;/p&gt;
&lt;p&gt;And in the IDE i have the message : CONFIG_PM was assigned the value y, but got the value n. Missing dependencies:&lt;/p&gt;
&lt;p&gt;(SOC_SERIES_EFR32BG22 &amp;amp;&amp;amp; SOC_VENDOR_SILABS) || (SOC_SERIES_EFR32BG27 &amp;amp;&amp;amp; SOC_VENDOR_SILABS) || (SOC_SERIES_EFR32MG24 &amp;amp;&amp;amp; SOC_VENDOR_SILABS) || (SYS_CLOCK_EXISTS &amp;amp;&amp;amp; HAS_PM)&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;My full functionnal goal is :&lt;/p&gt;
&lt;p&gt;Get GPIO state on/off on a pin by interrupt reading. I need to get the time spent between 2 high state interrupts, in order to calculate the frequency of the input signal.&lt;br /&gt;It is from 2000hz to 5000hz, for what i count tics spent between 2 interrupts events on the 32khz clock&lt;br /&gt;Id do that for 100ms, i get at the end the average of frequencies, i send it by radio to third application then i go to deep sleep for 900ms and need a wake up by a timer.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// Include necessary Zephyr and Nordic headers
#include &amp;lt;zephyr/drivers/gpio.h&amp;gt;
#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/logging/log.h&amp;gt;
#include &amp;lt;esb.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;

LOG_MODULE_REGISTER(esb_ptx, CONFIG_ESB_PTX_APP_LOG_LEVEL);

#define INTERRUPT_PIN 15               // GPIO pin for the interrupt
#define MAX_INTERRUPTS 500             // Max number of interrupts to capture

// Define GPIO configuration for the interrupt pin
static const struct gpio_dt_spec interrupt_pin = {
    .port = DEVICE_DT_GET(DT_NODELABEL(gpio0)),
    .pin = INTERRUPT_PIN,
    .dt_flags = GPIO_INPUT | GPIO_INT_EDGE_RISING,
};

// GPIO callback structure
static struct gpio_callback interrupt_cb_data;

// Variables to store interrupt data
volatile int interrupt_count = 0;
volatile uint32_t timestamps[MAX_INTERRUPTS];  // Array to store interrupt timestamps

// ESB payload for data transmission
static struct esb_payload tx_payload = ESB_CREATE_PAYLOAD(0);

// Function prototypes
static void interrupt_handler(const struct device *dev, struct gpio_callback *cb, uint32_t pins);
static int esb_initialize(void);
static void calculate_and_transmit(void);

// Interrupt handler
static void interrupt_handler(const struct device *dev, struct gpio_callback *cb, uint32_t pins) {
    if (interrupt_count &amp;lt; MAX_INTERRUPTS) {
        timestamps[interrupt_count++] = k_cycle_get_32();  // Capture the timestamp
    }
}

// Initialize Enhanced ShockBurst (ESB)
static int esb_initialize(void) {
    int err;
    uint8_t base_addr_0[4] = {0xE7, 0xE7, 0xE7, 0xE7};
    uint8_t base_addr_1[4] = {0xC2, 0xC2, 0xC2, 0xC2};
    uint8_t addr_prefix[8] = {0xE7, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8};

    struct esb_config config = ESB_DEFAULT_CONFIG;
    config.protocol = ESB_PROTOCOL_ESB_DPL;
    config.bitrate = ESB_BITRATE_1MBPS;
    config.mode = ESB_MODE_PTX;
    config.tx_output_power = ESB_TX_POWER_0DBM;

    err = esb_init(&amp;amp;config);
    if (err) {
        return err;
    }

    err = esb_set_base_address_0(base_addr_0);
    if (err) {
        return err;
    }

    err = esb_set_base_address_1(base_addr_1);
    if (err) {
        return err;
    }

    err = esb_set_prefixes(addr_prefix, ARRAY_SIZE(addr_prefix));
    return err;
}

// Calculate the average frequency and send via ESB
static void calculate_and_transmit(void) {
    if (interrupt_count &amp;lt; 2) {
        LOG_INF(&amp;quot;Not enough interrupts to calculate frequency.&amp;quot;);
        return;
    }

    uint32_t total_ticks = 0;
    for (int i = 1; i &amp;lt; interrupt_count; i++) {
        total_ticks += (timestamps[i] - timestamps[i - 1]);
    }

    uint32_t average_ticks = total_ticks / (interrupt_count - 1);

    // Format the payload as &amp;quot;XX_YYY&amp;quot;
    char payload[8];
    snprintf(payload, sizeof(payload), &amp;quot;%02d_%03d&amp;quot;, average_ticks, interrupt_count);

    // Copy the formatted string into the ESB payload
    strncpy((char *)tx_payload.data, payload, sizeof(tx_payload.data));
    tx_payload.length = strlen(payload);

    // Send the payload
    if (esb_write_payload(&amp;amp;tx_payload)) {
        LOG_ERR(&amp;quot;Failed to send payload.&amp;quot;);
    } else {
        LOG_INF(&amp;quot;Data sent: %s&amp;quot;, payload);
    }
}

void main(void) {
    int err;

    // Configure the interrupt pin
    gpio_pin_configure(interrupt_pin.port, interrupt_pin.pin, GPIO_INPUT);
    gpio_pin_interrupt_configure(interrupt_pin.port, interrupt_pin.pin, GPIO_INT_EDGE_RISING);

    gpio_init_callback(&amp;amp;interrupt_cb_data, interrupt_handler, BIT(interrupt_pin.pin));
    gpio_add_callback(interrupt_pin.port, &amp;amp;interrupt_cb_data);

    // Initialize ESB
    err = esb_initialize();
    if (err) {
        LOG_ERR(&amp;quot;Failed to initialize ESB, error: %d&amp;quot;, err);
        return;
    }

    LOG_INF(&amp;quot;System initialized. Waiting for interrupts...&amp;quot;);

    while (1) {
        interrupt_count = 0;

        // Monitor interrupts for 100 ms
        k_sleep(K_MSEC(100));

        // Calculate and send the result
        calculate_and_transmit();

        // Wait before the next sampling
        k_sleep(K_MSEC(900));
    }
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;prj.conf&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_NCS_SAMPLES_DEFAULTS=y
CONFIG_ESB=y
CONFIG_DK_LIBRARY=y

# Power management
CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_RUNTIME=y

&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;i get an average power consumption of 520uA&lt;br /&gt;&lt;br /&gt;For some reason if i plug in the dongle in an USB port the consomption raise up to 2mA.&lt;br /&gt;SB2 is cut, CB1 soldiered. If i only put the device in USB port (without power it wit PKK) it can&amp;#39;t put the device in bootloader mode.&lt;br /&gt;&lt;br /&gt;If i just put&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;main&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;while&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;i get 2.91 mA&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 DONGLE NCS 2.7.0 LOW POWER MODE</title><link>https://devzone.nordicsemi.com/thread/511903?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2024 13:24:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5993f2a-d0bb-4c2c-bb31-ac01207d86f3</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi krypton76,&lt;/p&gt;
&lt;p&gt;I recommend first comment out all of your code and just let main() returns, and measure the current there, see how much current you have. If you have above 10uA, that&amp;#39;s indicative that you have other subsystems running that is consuming power.&lt;/p&gt;
&lt;p&gt;Secondly,&amp;nbsp;I am a little confused if you want to&amp;nbsp;actively polling GPIO every second, or if you want to passively get GPIO interrupt. If you use GPIO interrupt, you are using GPIOTE, and with that comes a little more current consumption. It should only be under 1uA increase, however. See&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf52832/page/gpiote.html#d919e11466"&gt;GPIOTE — GPIO tasks and events&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Thirdly, do you need tight timing? If you don&amp;#39;t, I recommend using the Zephyr RTOS system timing instead of running a separate peripheral. While you are using&amp;nbsp;RTC, and don&amp;#39;t introduce a new active clock source, it is still more current consumed there.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CONFIG_PM&amp;nbsp;isn&amp;#39;t deprecated. I am not certain about pm_state_* functions, but I haven&amp;#39;t exactly followed it. Could you share the source that gives you that impression so I can look further into it?&lt;br /&gt;Otherwise, for your requirement, I don&amp;#39;t think you need to touch PM or PM device to achieve sub 10uA. As long as all your thread goes into sleep, you should achieve System ON Idle, which should get you within the target.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Hieu&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 DONGLE NCS 2.7.0 LOW POWER MODE</title><link>https://devzone.nordicsemi.com/thread/511741?ContentTypeID=1</link><pubDate>Fri, 22 Nov 2024 17:50:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74d69f97-38f6-4e05-bc62-89ccfa3d4354</guid><dc:creator>krypton76</dc:creator><description>&lt;p&gt;As i understood, CONFIG_PM is deprecated and pm_state_* functions too.&lt;br /&gt;&lt;br /&gt;So i start a new simple project :&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/device.h&amp;gt;
#include &amp;lt;hal/nrf_rtc.h&amp;gt;
#include &amp;lt;zephyr/pm/device.h&amp;gt;
#include &amp;lt;zephyr/logging/log.h&amp;gt;

LOG_MODULE_REGISTER(main, LOG_LEVEL_INF);

// Configuration RTC
#define RTC NRF_RTC1
#define RTC_FREQUENCY 32768    // Fr&amp;#233;quence de l&amp;#39;horloge RTC (32.768 kHz)
#define TIMEOUT_MS 900         // Temps d&amp;#39;attente en millisecondes
#define TIMEOUT_TICKS (TIMEOUT_MS * RTC_FREQUENCY / 1000)

volatile bool rtc_timeout = false;

// Liste des p&amp;#233;riph&amp;#233;riques &amp;#224; d&amp;#233;sactiver
const char *devices_to_disable[] = {
    &amp;quot;UART_0&amp;quot;,
    &amp;quot;UART_1&amp;quot;,
    &amp;quot;SPI_0&amp;quot;,
    &amp;quot;SPI_1&amp;quot;,
    &amp;quot;I2C_0&amp;quot;,
    &amp;quot;I2C_1&amp;quot;,
    &amp;quot;PWM_0&amp;quot;,
    &amp;quot;PWM_1&amp;quot;,
    &amp;quot;ADC_0&amp;quot;,
};

// Gestionnaire d&amp;#39;interruption RTC
void rtc_handler(void)
{
    if (nrf_rtc_event_check(RTC, NRF_RTC_EVENT_COMPARE_0)) {
        nrf_rtc_event_clear(RTC, NRF_RTC_EVENT_COMPARE_0);
        rtc_timeout = true;
        LOG_INF(&amp;quot;RTC timeout reached&amp;quot;);
    }
}

void RTC1_IRQHandler(void)
{
    rtc_handler();
}

// Configurer le RTC pour g&amp;#233;n&amp;#233;rer une interruption apr&amp;#232;s TIMEOUT_MS
static void configure_rtc(void)
{
    nrf_rtc_prescaler_set(RTC, 0);  // Pas de division, fr&amp;#233;quence &amp;#224; 32.768 kHz
    nrf_rtc_cc_set(RTC, 0, TIMEOUT_TICKS);
    nrf_rtc_event_enable(RTC, NRF_RTC_INT_COMPARE0_MASK);
    nrf_rtc_int_enable(RTC, NRF_RTC_INT_COMPARE0_MASK);
    nrf_rtc_task_trigger(RTC, NRF_RTC_TASK_CLEAR);
    nrf_rtc_task_trigger(RTC, NRF_RTC_TASK_START);

    NVIC_ClearPendingIRQ(RTC1_IRQn);
    NVIC_SetPriority(RTC1_IRQn, 1);
    NVIC_EnableIRQ(RTC1_IRQn);

    LOG_INF(&amp;quot;RTC configured for timeout of %d ms&amp;quot;, TIMEOUT_MS);
}

// D&amp;#233;sactiver les p&amp;#233;riph&amp;#233;riques inutiles pour r&amp;#233;duire la consommation
static void disable_unused_devices(void)
{
    for (int i = 0; i &amp;lt; ARRAY_SIZE(devices_to_disable); i++) {
        const struct device *dev = device_get_binding(devices_to_disable[i]);
        if (!dev) {
            LOG_WRN(&amp;quot;Device %s not found&amp;quot;, devices_to_disable[i]);
            continue;
        }

        if (pm_device_action_run(dev, PM_DEVICE_ACTION_SUSPEND) == 0) {
            LOG_INF(&amp;quot;Device %s suspended&amp;quot;, devices_to_disable[i]);
        } else {
            LOG_WRN(&amp;quot;Failed to suspend device %s&amp;quot;, devices_to_disable[i]);
        }
    }
}

void main(void)
{
    LOG_INF(&amp;quot;Starting low-power mode with RTC wakeup&amp;quot;);

    // Configurer le RTC
    configure_rtc();

    // D&amp;#233;sactiver les p&amp;#233;riph&amp;#233;riques inutilis&amp;#233;s
    disable_unused_devices();

    while (1) {
        rtc_timeout = false;

        LOG_INF(&amp;quot;Entering low-power mode for 900 ms...&amp;quot;);
        k_sleep(K_MSEC(900));  // Le syst&amp;#232;me entre en System ON Idle ici

        // Attendre que le RTC atteigne son timeout
        while (!rtc_timeout) {
            k_sleep(K_MSEC(1));
        }

        LOG_INF(&amp;quot;Woke up from low-power mode&amp;quot;);
    }
}
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Enable GPIO and RTC
CONFIG_GPIO=y

# Enable power management
CONFIG_PM_DEVICE=y

# Optimize stack sizes
CONFIG_MAIN_STACK_SIZE=1024
CONFIG_IDLE_STACK_SIZE=256

# Disable unnecessary logging to save power
CONFIG_PRINTK=n
CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_LOG=y
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And i works a bit, but i get a constant average consumption of 214uA, which is far more than expected, regarding what it does.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>