-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
snippets: add new snippet for uart based modem trace
Add new snippet 'nrf9x-modem-trace-uart'. The new snippet can be used to enable modem tracing over uart for either nrf91 or nrf92 application. It works similar to snippet 'nrf91-modem-trace-uart'. The 'nrf91-modem-trace-uart' snippet is deprecated, but kept for backwards compatibility. Signed-off-by: Andreas Moltumyr <[email protected]>
- Loading branch information
Showing
7 changed files
with
86 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
name: nrf91-modem-trace-uart | ||
append: | ||
EXTRA_DTC_OVERLAY_FILE: modem-trace-uart.overlay | ||
EXTRA_CONF_FILE: overlay-modem-trace-uart.conf | ||
EXTRA_CONF_FILE: ../nrf9x-modem-trace-uart/modem-trace-uart-common.conf | ||
|
||
boards: | ||
/.*/nrf91[0-9][0-9]/.*/: | ||
append: | ||
EXTRA_DTC_OVERLAY_FILE: ../nrf9x-modem-trace-uart/modem-trace-uart-nrf91.overlay | ||
EXTRA_CONF_FILE: ../nrf9x-modem-trace-uart/modem-trace-uart-nrf91.conf | ||
|
||
Check warning on line 10 in snippets/nrf91-modem-trace-uart/snippet.yml
|
||
#Deprecated. Kept for backwards compatibility. Use snippet nrf9x-modem-trace-uart. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
snippets/nrf9x-modem-trace-uart/modem-trace-uart-nrf91.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# | ||
# Copyright (c) 2023 Nordic Semiconductor | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
# UART configuration (nRF91 specific) | ||
CONFIG_UART_1_ASYNC=y | ||
CONFIG_UART_1_INTERRUPT_DRIVEN=n | ||
|
||
# Power management | ||
CONFIG_PM_DEVICE=y |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# | ||
# Copyright (c) 2025 Nordic Semiconductor | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
# UART configuration (nRF92 specific) | ||
CONFIG_UART_135_ASYNC=y | ||
CONFIG_UART_135_INTERRUPT_DRIVEN=n |
41 changes: 41 additions & 0 deletions
41
snippets/nrf9x-modem-trace-uart/modem-trace-uart-nrf92.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright (c) 2025 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
*/ | ||
|
||
/* Enable uart135 for tracing. */ | ||
&uart135 { | ||
status = "okay"; | ||
current-speed = < 1000000 >; | ||
memory-regions = < &modem_trace_dma_region >; | ||
}; | ||
|
||
/ { | ||
chosen { | ||
nordic,modem-trace-uart = &uart135; | ||
}; | ||
|
||
reserved-memory { | ||
/* Add memory region for tracing UART. */ | ||
modem_trace_dma_region: memory@2fc06800 { | ||
compatible = "nordic,owned-memory", "zephyr,memory-region"; | ||
reg = <0x2fc06800 DT_SIZE_K(2)>; | ||
status = "okay"; | ||
#memory-region-cells = <0>; | ||
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RW>; | ||
zephyr,memory-region = "DMA_RAM3x_MODEM_TRACE"; | ||
zephyr,memory-attr = <( DT_MEM_DMA )>; | ||
}; | ||
}; | ||
}; | ||
|
||
/* Reduce size to make room for modem trace dma region. */ | ||
&cpuapp_dma_region { | ||
reg = <0x2fc06000 DT_SIZE_K(2)>; | ||
}; | ||
|
||
/* Enable the trace signal on the application bellboard. */ | ||
&cpuapp_bellboard { | ||
nordic,interrupt-mapping = <0xE3042041 0>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: nrf9x-modem-trace-uart | ||
append: | ||
EXTRA_CONF_FILE: modem-trace-uart-common.conf | ||
|
||
boards: | ||
/.*/nrf91[0-9][0-9]/ns/: | ||
append: | ||
EXTRA_DTC_OVERLAY_FILE: modem-trace-uart-nrf91.overlay | ||
EXTRA_CONF_FILE: modem-trace-uart-nrf91.conf | ||
/.*/nrf92[0-9][0-9]/cpuapp/: | ||
append: | ||
EXTRA_DTC_OVERLAY_FILE: modem-trace-uart-nrf92.overlay | ||
EXTRA_CONF_FILE: modem-trace-uart-nrf92.conf |