Skip to content

Commit 565b15f

Browse files
rob-robinson-14nordicjm
authored andcommitted
boards: Add nrf7120pdk/nrf7120cpuapp/emu
Add board configuration for nRF7120 emulator Add work around for starting LFRC clock ahead of grtc init Signed-off-by: Robert Robinson <[email protected]>
1 parent 3b8d868 commit 565b15f

File tree

9 files changed

+174
-1
lines changed

9 files changed

+174
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
3+
4+
zephyr_library_sources(board.c)

boards/nordic/nrf7120pdk/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
3+
4+
config BOARD_NRF7120PDK
5+
select BOARD_EARLY_INIT_HOOK if BOARD_NRF7120PDK_NRF7120_CPUAPP_EMU

boards/nordic/nrf7120pdk/Kconfig.nrf7120pdk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
33
config BOARD_NRF7120PDK
44
select SOC_NRF7120_ENGA_CPUAPP if BOARD_NRF7120PDK_NRF7120_CPUAPP || \
5-
BOARD_NRF7120PDK_NRF7120_CPUAPP_NS
5+
BOARD_NRF7120PDK_NRF7120_CPUAPP_NS || \
6+
BOARD_NRF7120PDK_NRF7120_CPUAPP_EMU
67
select SOC_NRF7120_ENGA_CPUFLPR if BOARD_NRF7120PDK_NRF7120_CPUFLPR || \
78
BOARD_NRF7120PDK_NRF7120_CPUFLPR_XIP

boards/nordic/nrf7120pdk/board.c

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include <zephyr/platform/hooks.h>
8+
#include "nrf7120_enga_types.h"
9+
#include "nrf7120_enga_global.h"
10+
11+
#if CONFIG_BOARD_EARLY_INIT_HOOK
12+
/* Temporary workaround while VPR does not handle starting LFRC */
13+
void board_early_init_hook(void)
14+
{
15+
NRF_CLOCK_S->LFCLK.SRC = CLOCK_LFCLK_SRC_SRC_LFRC;
16+
NRF_CLOCK_S->TASKS_LFCLKSTART = 1;
17+
18+
/* Wait for event */
19+
while (NRF_CLOCK_S->EVENTS_LFCLKSTARTED !=
20+
CLOCK_EVENTS_LFCLKSTARTED_EVENTS_LFCLKSTARTED_Generated) {
21+
22+
}
23+
}
24+
#endif

boards/nordic/nrf7120pdk/board.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ board:
88
cpucluster: cpuflpr
99
- name: ns
1010
cpucluster: cpuapp
11+
- name: emu
12+
cpucluster: cpuapp
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor
3+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
4+
*/
5+
6+
&pinctrl {
7+
uart00_default: uart00_default {
8+
group1 {
9+
psels = <NRF_PSEL(UART_TX, 2, 2)>,
10+
<NRF_PSEL(UART_RTS, 2, 5)>;
11+
};
12+
13+
group2 {
14+
psels = <NRF_PSEL(UART_RX, 2, 0)>,
15+
<NRF_PSEL(UART_CTS, 2, 4)>;
16+
bias-pull-up;
17+
};
18+
};
19+
20+
uart00_sleep: uart00_sleep {
21+
group1 {
22+
psels = <NRF_PSEL(UART_TX, 2, 2)>,
23+
<NRF_PSEL(UART_RX, 2, 0)>,
24+
<NRF_PSEL(UART_RTS, 2, 5)>,
25+
<NRF_PSEL(UART_CTS, 2, 4)>;
26+
low-power-enable;
27+
};
28+
};
29+
};
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "nrf7120_cpuapp_common.dtsi"
10+
#include "nrf7120pdk_nrf7120-emu-pinctrl.dtsi"
11+
12+
/ {
13+
compatible = "nordic,nrf7120pdk_nrf7120-cpuapp";
14+
model = "Nordic nRF7120 PDK nRF7120 Application MCU";
15+
16+
chosen {
17+
zephyr,sram = &cpuapp_sram;
18+
zephyr,console = &uart00;
19+
zephyr,shell-uart = &uart00;
20+
};
21+
};
22+
23+
&uart00 {
24+
status = "okay";
25+
current-speed = <115200>;
26+
pinctrl-0 = <&uart00_default>;
27+
pinctrl-1 = <&uart00_sleep>;
28+
pinctrl-names = "default", "sleep";
29+
};
30+
31+
&grtc {
32+
status = "okay";
33+
};
34+
35+
&systick {
36+
status = "disabled";
37+
};
38+
39+
&psa_rng {
40+
status = "okay";
41+
};
42+
43+
&uicr {
44+
status = "disabled";
45+
};
46+
47+
&clock {
48+
status = "okay";
49+
};
50+
51+
&cpuapp_sram {
52+
status = "okay";
53+
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
3+
4+
identifier: nrf7120pdk/nrf7120/cpuapp/emu
5+
name: nRF7120-PDK-nRF7120-Application
6+
type: mcu
7+
arch: arm
8+
toolchain:
9+
- gnuarmemb
10+
- xtools
11+
- zephyr
12+
sysbuild: true
13+
ram: 512
14+
flash: 960
15+
supported:
16+
- adc
17+
- counter
18+
- gpio
19+
- i2c
20+
- pwm
21+
- spi
22+
- watchdog
23+
- i2s
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
3+
4+
# Enable UART driver
5+
CONFIG_SERIAL=y
6+
7+
# Enable console
8+
CONFIG_CONSOLE=y
9+
CONFIG_UART_CONSOLE=y
10+
11+
# Enable GPIO
12+
CONFIG_GPIO=y
13+
14+
# Enable MPU
15+
CONFIG_ARM_MPU=y
16+
17+
# Enable hardware stack protection
18+
CONFIG_HW_STACK_PROTECTION=y
19+
20+
# MPU-based null-pointer dereferencing detection cannot
21+
# be applied as the (0x0 - 0x400) is unmapped for this target.
22+
CONFIG_NULL_POINTER_EXCEPTION_DETECTION_NONE=y
23+
24+
# Start SYSCOUNTER on driver init
25+
CONFIG_NRF_GRTC_TIMER_APP_DEFINED_INIT=n
26+
CONFIG_NRF_GRTC_START_SYSCOUNTER=y
27+
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
28+
29+
# Enable Debugging when working with emulator
30+
CONFIG_OUTPUT_DISASSEMBLY=y
31+
CONFIG_DEBUG=y
32+
CONFIG_LOG=y

0 commit comments

Comments
 (0)