-
Notifications
You must be signed in to change notification settings - Fork 8k
samples: boards: nordic: spis_wakeup: Run sample on APP+PPR #97113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright (c) 2025 Nordic Semiconductor ASA | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
source "$(ZEPHYR_BASE)/share/sysbuild/Kconfig" | ||
|
||
choice REMOTE_NRF54H20_CORE | ||
prompt "Remote nRF54h20 core" | ||
default REMOTE_NRF54H20_CPURAD_CORE | ||
depends on SOC_NRF54H20_CPUAPP | ||
|
||
config REMOTE_NRF54H20_CPUPPR_CORE | ||
bool "ppr core" | ||
|
||
config REMOTE_NRF54H20_CPURAD_CORE | ||
bool "cpurad" | ||
|
||
endchoice | ||
|
||
config REMOTE_BOARD | ||
string | ||
default "$(BOARD)/nrf54h20/cpurad" if SOC_NRF54H20_CPUAPP && REMOTE_NRF54H20_CPURAD_CORE | ||
default "$(BOARD)/nrf54h20/cpuppr/xip" if SOC_NRF54H20_CPUAPP && REMOTE_NRF54H20_CPUPPR_CORE |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* Copyright (c) 2025 Nordic Semiconductor ASA | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/ { | ||
aliases { | ||
led = &led0; | ||
spis = &spi130; | ||
/delete-property/ sw0; | ||
/delete-property/ sw1; | ||
/delete-property/ sw2; | ||
/delete-property/ sw3; | ||
}; | ||
/delete-node/ buttons; | ||
}; | ||
|
||
&exmif { | ||
status = "disabled"; | ||
}; | ||
|
||
&gpiote130 { | ||
status = "okay"; | ||
owned-channels = <0>; | ||
}; | ||
|
||
&pinctrl { | ||
spi130_default_alt: spi130_default_alt { | ||
group1 { | ||
psels = <NRF_PSEL(SPIS_SCK, 0, 0)>, | ||
<NRF_PSEL(SPIS_MOSI, 0, 6)>, | ||
<NRF_PSEL(SPIS_MISO, 0, 8)>, | ||
<NRF_PSEL(SPIS_CSN, 0, 10)>; | ||
}; | ||
}; | ||
|
||
spi130_sleep_alt: spi130_sleep_alt { | ||
group1 { | ||
psels = <NRF_PSEL(SPIS_SCK, 0, 0)>, | ||
<NRF_PSEL(SPIS_MOSI, 0, 6)>, | ||
<NRF_PSEL(SPIS_MISO, 0, 8)>, | ||
<NRF_PSEL(SPIS_CSN, 0, 10)>; | ||
low-power-enable; | ||
}; | ||
}; | ||
}; | ||
|
||
&spi130 { | ||
compatible = "nordic,nrf-spis"; | ||
status = "okay"; | ||
def-char = <0x00>; | ||
pinctrl-0 = <&spi130_default_alt>; | ||
pinctrl-1 = <&spi130_sleep_alt>; | ||
pinctrl-names = "default", "sleep"; | ||
wake-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>; | ||
memory-regions = <&cpuapp_dma_region>; | ||
zephyr,pm-device-runtime-auto; | ||
/delete-property/ rx-delay-supported; | ||
/delete-property/ rx-delay; | ||
}; | ||
|
||
&uart136 { | ||
zephyr,pm-device-runtime-auto; | ||
}; |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Include common and delete references to |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PPR inherits permissions from its owner (APP). Therefore, APP must take ownership of |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Copyright (c) 2025 Nordic Semiconductor ASA | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include "nrf54h20dk_nrf54h20_common.dtsi" | ||
|
||
&spi131 { | ||
status = "reserved"; | ||
interrupt-parent = <&cpuppr_clic>; | ||
}; | ||
|
||
&uart135 { | ||
status = "reserved"; | ||
interrupt-parent = <&cpuppr_clic>; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,32 @@ | ||
common: | ||
sysbuild: true | ||
depends_on: spi | ||
tags: | ||
- spi | ||
harness: console | ||
harness_config: | ||
fixture: spi_loopback | ||
type: multi_line | ||
ordered: true | ||
regex: | ||
- ".*SPIS: waiting for SPI transfer" | ||
- ".*SPIS: woken up by" | ||
|
||
sample: | ||
name: SPI wakeup sample | ||
tests: | ||
sample.drivers.spis.wakeup: | ||
tags: | ||
- spi | ||
platform_allow: | ||
- nrf54h20dk/nrf54h20/cpuapp | ||
integration_platforms: | ||
- nrf54h20dk/nrf54h20/cpuapp | ||
harness: console | ||
harness_config: | ||
fixture: spi_loopback | ||
type: multi_line | ||
ordered: true | ||
regex: | ||
- ".*SPIS: waiting for SPI transfer" | ||
- ".*SPIS: woken up by" | ||
sample.drivers.spis.wakeup.ppr: | ||
platform_allow: | ||
- nrf54h20dk/nrf54h20/cpuapp | ||
integration_platforms: | ||
- nrf54h20dk/nrf54h20/cpuapp | ||
extra_args: | ||
- SB_CONFIG_REMOTE_NRF54H20_CPUPPR_CORE=y | ||
- spis_wakeup_CONFIG_SOC_NRF54H20_CPURAD_ENABLE=n | ||
- spis_wakeup_SNIPPET=nordic-ppr-xip | ||
- DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_with_cpuppr.overlay" |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Move common part for "remote" core to a separate file. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* | ||
* Copyright (c) 2025 Nordic Semiconductor | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/ { | ||
aliases { | ||
led = &led1; | ||
}; | ||
|
||
leds { | ||
compatible = "gpio-leds"; | ||
led1: led_1 { | ||
gpios = <&gpio9 1 GPIO_ACTIVE_HIGH>; | ||
label = "Green LED 1"; | ||
}; | ||
}; | ||
}; | ||
|
||
&gpiote130 { | ||
status = "okay"; | ||
owned-channels = <1>; | ||
}; | ||
|
||
&gpio0 { | ||
status = "okay"; | ||
}; | ||
|
||
&gpio9 { | ||
status = "okay"; | ||
}; | ||
|
||
&pinctrl { | ||
spi131_default_alt: spi131_default_alt { | ||
group1 { | ||
psels = <NRF_PSEL(SPIM_SCK, 0, 1)>, | ||
<NRF_PSEL(SPIM_MOSI, 0, 7)>, | ||
<NRF_PSEL(SPIM_MISO, 0, 9)>; | ||
}; | ||
}; | ||
|
||
spi131_sleep_alt: spi131_sleep_alt { | ||
group1 { | ||
psels = <NRF_PSEL(SPIM_SCK, 0, 1)>, | ||
<NRF_PSEL(SPIM_MOSI, 0, 7)>, | ||
<NRF_PSEL(SPIM_MISO, 0, 9)>; | ||
low-power-enable; | ||
}; | ||
}; | ||
}; | ||
|
||
&spi131 { | ||
compatible = "nordic,nrf-spim"; | ||
status = "okay"; | ||
pinctrl-0 = <&spi131_default_alt>; | ||
pinctrl-1 = <&spi131_sleep_alt>; | ||
pinctrl-names = "default", "sleep"; | ||
overrun-character = <0x00>; | ||
cs-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; | ||
wake-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>; | ||
zephyr,pm-device-runtime-auto; | ||
spim_dt: spi-device@0 { | ||
compatible = "vnd,spi-device"; | ||
reg = <0>; | ||
spi-max-frequency = <DT_FREQ_M(8)>; | ||
}; | ||
}; | ||
|
||
&uart135 { | ||
zephyr,pm-device-runtime-auto; | ||
}; |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is only to limit code size. Otherwise, sample doesn't fit in available ROM. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONFIG_ASSERT=n |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* | ||
* Copyright (c) 2025 Nordic Semiconductor | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include "nrf54h20dk_nrf54h20_common.dtsi" |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed from remote core prj.conf because PPR doesn't support CONFIG_PM and binary file is too big when ASSERTS are enabled. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
CONFIG_PM=y | ||
|
||
CONFIG_ASSERT=y |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Common file plus set memory-regions property in spi131. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now, there are two sample configurations: APP+Radio and APP+PPR.
I moved common DTS part on APP to a separate file.