Skip to content

Commit 8b9b8d6

Browse files
committed
remove checking of remote board
This is temporary change, to be checked if really needed to check remote board. Signed-off-by: Łukasz Stępnicki <[email protected]>
1 parent ef22c59 commit 8b9b8d6

File tree

8 files changed

+97
-6
lines changed

8 files changed

+97
-6
lines changed

boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts

+1
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ ipc0: &cpuapp_cpurad_ipc {
171171

172172
&cpuapp_cpusys_ipc {
173173
status = "okay";
174+
unbound = "detect";
174175
mbox-names = "rx", "tx";
175176
tx-region = <&cpuapp_cpusys_ipc_shm>;
176177
rx-region = <&cpusys_cpuapp_ipc_shm>;

boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad.dts

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ ipc0: &cpuapp_cpurad_ipc {
7676

7777
&cpurad_cpusys_ipc {
7878
status = "okay";
79+
unbound = "detect";
7980
mbox-names = "rx", "tx";
8081
tx-region = <&cpurad_cpusys_ipc_shm>;
8182
rx-region = <&cpusys_cpurad_ipc_shm>;

samples/boards/nordic/system_off/prj.conf

+4
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@ CONFIG_PM_DEVICE=y
22
CONFIG_GPIO=y
33
CONFIG_CRC=y
44
CONFIG_POWEROFF=y
5+
6+
# Misc
7+
CONFIG_NRF_REGTOOL_VERBOSITY=1
8+
CONFIG_NRFS_BACKEND_LOG_LEVEL_DBG=y
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
3+
CONFIG_LOG=n
4+
CONFIG_SERIAL=n
5+
CONFIG_UART_CONSOLE=n
6+
CONFIG_CONSOLE=n
7+
CONFIG_PRINTK=n
8+
CONFIG_EARLY_CONSOLE=n
9+
CONFIG_NCS_BOOT_BANNER=n
10+
CONFIG_ASSERT_VERBOSE=n
11+
CONFIG_BOOT_BANNER=n
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright (c) 2022 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
5+
*/
6+
7+
/ {
8+
chosen {
9+
/delete-property/ zephyr,console;
10+
/delete-property/ zephyr,shell-uart;
11+
};
12+
};
13+
14+
&uart135 {
15+
status = "disabled";
16+
/delete-property/memory-regions;
17+
};
18+
19+
&uart136 {
20+
status = "disabled";
21+
/delete-property/memory-regions;
22+
};
23+
24+
&cpurad_cpusys_ipc {
25+
status = "okay";
26+
};
27+
28+
&cpusys_vevif {
29+
status = "okay";
30+
};
31+
32+
&cpurad_dma_region {
33+
status = "okay";
34+
};

samples/boards/nordic/system_off/remote/src/main.c

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
int main(void)
1414
{
15+
#if 0
1516
int rc;
1617
const struct device *const cons = DEVICE_DT_GET(DT_CHOSEN(zephyr_console));
1718

@@ -22,6 +23,7 @@ int main(void)
2223
printf("Could not suspend console (%d)\n", rc);
2324
return 0;
2425
}
26+
#endif
2527

2628
/* Turn off retention of the local radio domain RAM. */
2729
nrf_memconf_ramblock_ret_mask_enable_set(NRF_MEMCONF, 0, RAMBLOCK_RET_MASK, false);

samples/boards/nordic/system_off/src/main.c

+44
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@
1818
#include <hal/nrf_gpio.h>
1919
#if CONFIG_SOC_NRF54H20_CPUAPP
2020
#include <hal/nrf_memconf.h>
21+
#include <internal/nrfs_backend.h>
22+
#include <nrfs_backend_ipc_service.h>
23+
#include <nrfs_mram.h>
24+
#include <nrfs_temp.h>
25+
#include <nrfs_pmic.h>
26+
#include <nrfs_usb.h>
27+
#include <nrfs_clock.h>
28+
#include <nrfs_gdpwr.h>
29+
#include <nrfs_gdfs.h>
2130
#endif
2231

2332
#if IS_ENABLED(CONFIG_GRTC_WAKEUP_ENABLE)
@@ -29,6 +38,28 @@ static const struct gpio_dt_spec sw1 = GPIO_DT_SPEC_GET(DT_ALIAS(sw1), gpios);
2938
static const uint32_t port_sw1 = DT_PROP(DT_GPIO_CTLR_BY_IDX(DT_ALIAS(sw1), gpios, 0), port);
3039
#endif
3140

41+
void temp_handler(nrfs_temp_evt_t const *p_evt, void *context)
42+
{
43+
int32_t temp;
44+
45+
switch (p_evt->type) {
46+
case NRFS_TEMP_EVT_MEASURE_DONE:
47+
temp = nrfs_temp_from_raw(p_evt->raw_temp);
48+
printk("TEMP Measurement done: %d.%d [C]\n", temp / 100, temp % 100);
49+
break;
50+
case NRFS_TEMP_EVT_CHANGE:
51+
temp = nrfs_temp_from_raw(p_evt->raw_temp);
52+
printk("TEMP exceeded limit: %d.%d [C]\n", temp / 100, temp % 100);
53+
break;
54+
case NRFS_TEMP_EVT_REJECT:
55+
printk("TEMP handler - request rejected\n");
56+
break;
57+
default:
58+
printk("TEMP handler - unexpected event: 0x%x\n", p_evt->type);
59+
break;
60+
}
61+
}
62+
3263
int main(void)
3364
{
3465
int rc;
@@ -48,6 +79,13 @@ int main(void)
4879

4980
printf("\n%s system off demo\n", CONFIG_BOARD);
5081

82+
int status = nrfs_temp_init(temp_handler);
83+
if (status != NRFS_SUCCESS) {
84+
printk("TEMP service init failed: %d\n", status);
85+
} else {
86+
printk("Local TEMP init done\n");
87+
}
88+
5189
if (IS_ENABLED(CONFIG_APP_USE_RETAINED_MEM)) {
5290
bool retained_ok = retained_validate();
5391

@@ -116,11 +154,17 @@ int main(void)
116154
retained_update();
117155
}
118156

157+
status = nrfs_temp_subscribe(5000, nrfs_temp_to_raw(4000), nrfs_temp_to_raw(8000),
158+
(void *)NULL);
159+
160+
k_msleep(1000);
161+
119162
if (do_poweroff) {
120163
#if CONFIG_SOC_NRF54H20_CPUAPP
121164
/* Local RAM0 (TCM) is currently not used so retention can be disabled. */
122165
nrf_memconf_ramblock_ret_mask_enable_set(NRF_MEMCONF, 0, RAMBLOCK_RET_MASK, false);
123166
nrf_memconf_ramblock_ret_mask_enable_set(NRF_MEMCONF, 1, RAMBLOCK_RET_MASK, false);
167+
//nrfs_backend_close_connection();
124168
#endif
125169
sys_poweroff();
126170
} else {

samples/boards/nordic/system_off/sysbuild.cmake

-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
# Copyright (c) 2024 Nordic Semiconductor ASA
22
# SPDX-License-Identifier: Apache-2.0
33

4-
if("${SB_CONFIG_REMOTE_CORE_BOARD}" STREQUAL "")
5-
message(FATAL_ERROR
6-
"Target ${BOARD} not supported for this sample. "
7-
"There is no remote board selected in Kconfig.sysbuild")
8-
endif()
9-
104
set(REMOTE_APP remote)
115

126
ExternalZephyrProject_Add(

0 commit comments

Comments
 (0)