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 6
6
7
7
#include <zephyr/device.h>
8
8
#include <zephyr/sys/printk.h>
9
+ #include <zephyr/pm/device_runtime.h>
9
10
10
11
#include "transport/dtm_transport.h"
11
12
@@ -16,6 +17,18 @@ int main(void)
16
17
17
18
printk ("Starting Direct Test Mode sample\n" );
18
19
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
+
19
32
err = dtm_tr_init ();
20
33
if (err ) {
21
34
printk ("Error initializing DTM transport: %d\n" , err );
Original file line number Diff line number Diff line change 7
7
#include <zephyr/sys/printk.h>
8
8
#include <zephyr/drivers/clock_control.h>
9
9
#include <zephyr/drivers/clock_control/nrf_clock_control.h>
10
+ #include <zephyr/pm/device_runtime.h>
10
11
#if defined(NRF54L15_XXAA )
11
12
#include <hal/nrf_clock.h>
12
13
#endif /* defined(NRF54L15_XXAA) */
@@ -165,6 +166,27 @@ int main(void)
165
166
{
166
167
printk ("Starting Radio Test sample\n" );
167
168
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
+
168
190
clock_init ();
169
191
170
192
#if defined(CONFIG_SOC_SERIES_NRF54HX )
You can’t perform that action at this time.
0 commit comments