File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
bluetooth/direct_test_mode/src
peripheral/radio_test/src Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 66
77#include <zephyr/device.h>
88#include <zephyr/sys/printk.h>
9+ #include <zephyr/pm/device_runtime.h>
910
1011#include "transport/dtm_transport.h"
1112
@@ -16,6 +17,18 @@ int main(void)
1617
1718 printk ("Starting Direct Test Mode sample\n" );
1819
20+ #if defined(CONFIG_SOC_SERIES_NRF54HX )
21+ const struct device * dtm_uart = DEVICE_DT_GET_OR_NULL (DT_CHOSEN (ncs_dtm_uart ));
22+
23+ if (dtm_uart != NULL ) {
24+ int ret = pm_device_runtime_get (dtm_uart );
25+
26+ if (ret < 0 ) {
27+ printk ("Failed to get DTM UART runtime PM: %d\n" , ret );
28+ }
29+ }
30+ #endif /* defined(CONFIG_SOC_SERIES_NRF54HX) */
31+
1932 err = dtm_tr_init ();
2033 if (err ) {
2134 printk ("Error initializing DTM transport: %d\n" , err );
Original file line number Diff line number Diff line change 77#include <zephyr/sys/printk.h>
88#include <zephyr/drivers/clock_control.h>
99#include <zephyr/drivers/clock_control/nrf_clock_control.h>
10+ #include <zephyr/pm/device_runtime.h>
1011#if defined(NRF54L15_XXAA )
1112#include <hal/nrf_clock.h>
1213#endif /* defined(NRF54L15_XXAA) */
@@ -165,6 +166,27 @@ int main(void)
165166{
166167 printk ("Starting Radio Test sample\n" );
167168
169+ #if defined(CONFIG_SOC_SERIES_NRF54HX )
170+ const struct device * console_uart = DEVICE_DT_GET_OR_NULL (DT_CHOSEN (zephyr_console ));
171+ const struct device * shell_uart = DEVICE_DT_GET_OR_NULL (DT_CHOSEN (zephyr_shell_uart ));
172+
173+ if (console_uart != NULL ) {
174+ int ret = pm_device_runtime_get (console_uart );
175+
176+ if (ret < 0 ) {
177+ printk ("Failed to get console UART runtime PM: %d\n" , ret );
178+ }
179+ }
180+
181+ if (shell_uart != NULL && shell_uart != console_uart ) {
182+ int ret = pm_device_runtime_get (shell_uart );
183+
184+ if (ret < 0 ) {
185+ printk ("Failed to get shell UART runtime PM: %d\n" , ret );
186+ }
187+ }
188+ #endif /* defined(CONFIG_SOC_SERIES_NRF54HX) */
189+
168190 clock_init ();
169191
170192#if defined(CONFIG_SOC_SERIES_NRF54HX )
You can’t perform that action at this time.
0 commit comments