Skip to content

Commit 16bbb4a

Browse files
maje-embrlubos
authored andcommitted
samples: peripheral_power_profiling: Add support for nRF54H20 target
Added support for the nrf54h20 board target. Currently, the System off mode is not supported by this sample for the nRF54H20 platform. Ref: NCSDK-28870 Signed-off-by: Marcin Jelinski <[email protected]>
1 parent 2b749ed commit 16bbb4a

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,10 @@ Bluetooth samples
290290

291291
* :ref:`peripheral_hids_mouse`
292292

293+
* :ref:`power_profiling` sample:
294+
295+
* Added support for the :ref:`zephyr:nrf54h20dk_nrf54h20` board target.
296+
293297
* Updated:
294298

295299
* Configurations of the following Bluetooth samples to make the :ref:`Zephyr Memory Storage (ZMS) <zephyr:zms_api>` the default settings backend for all board targets that use the MRAM technology:

samples/bluetooth/peripheral_power_profiling/README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ This is the deepest power saving mode the system can enter.
3939
In this mode, all core functionalities are powered down, and most peripherals are non-functional or non-responsive.
4040
The only mechanisms that are functional in this mode are reset and wake-up.
4141

42+
.. note::
43+
Currently, the **System off** mode is not supported by this sample for the nRF54H20 platform.
44+
4245
To wake up your development kit from the system off state, you have the following options:
4346

4447
.. tabs::

samples/bluetooth/peripheral_power_profiling/src/main.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,8 +644,13 @@ static void reset_reason_print(void)
644644
printk("Wake up by NFC field detected\n");
645645
} else if (reason & NRFX_RESET_REASON_OFF_MASK) {
646646
printk("Wake up by the advertising start buttons\n");
647+
#if defined(NRF_RESETINFO)
648+
} else if (reason & NRFX_RESET_REASON_LOCAL_SREQ_MASK) {
649+
printk("Application soft reset detected\n");
650+
#else
647651
} else if (reason & NRFX_RESET_REASON_SREQ_MASK) {
648652
printk("Application soft reset detected\n");
653+
#endif /* defined(NRF_RESETINFO) */
649654
} else if (reason & NRFX_RESET_REASON_RESETPIN_MASK) {
650655
printk("Reset from pin-reset\n");
651656
} else if (reason) {
@@ -657,6 +662,7 @@ static void reset_reason_print(void)
657662

658663
static void system_off(void)
659664
{
665+
#if !IS_ENABLED(CONFIG_SOC_SERIES_NRF54HX)
660666
printk("Powering off\n");
661667

662668
/* Clear the reset reason if it didn't do previously. */
@@ -685,6 +691,7 @@ static void system_off(void)
685691
#endif
686692

687693
sys_poweroff();
694+
#endif /* !IS_ENABLED(CONFIG_SOC_SERIES_NRF54HX) */
688695
}
689696

690697
static void system_off_work_handler(struct k_work *work)
@@ -696,9 +703,11 @@ static void advertising_terminated(struct bt_le_ext_adv *adv, struct bt_le_ext_a
696703
{
697704
if (!device_conn) {
698705
printk("Adverting set %p, terminated.\n", (void *)adv);
706+
#if !IS_ENABLED(CONFIG_SOC_SERIES_NRF54HX)
699707
printk("Scheduling system off\n");
700708

701709
k_work_schedule(&system_off_work, K_SECONDS(1));
710+
#endif /* !IS_ENABLED(CONFIG_SOC_SERIES_NRF54HX) */
702711
}
703712
}
704713

0 commit comments

Comments
 (0)