Skip to content
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

tests: benchmarks: Correct UARTE test with automatic PM #18767

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions tests/benchmarks/multicore/idle_uarte/Kconfig

This file was deleted.

15 changes: 1 addition & 14 deletions tests/benchmarks/multicore/idle_uarte/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
*/

#include <zephyr/drivers/uart.h>
#include <zephyr/pm/device.h>
#include <zephyr/pm/device_runtime.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/pm/device.h>
#include <zephyr/pm/device_runtime.h>

/* Note: logging is normally disabled for this test
* Enable only for debugging purposes
Expand Down Expand Up @@ -140,28 +139,16 @@ int main(void)
pm_device_runtime_enable(console_dev);
}

#if defined(CONFIG_TEST_AUTOMATIC_POWER_CONTROL)
enable_uart_rx();
#endif

while (1) {
printk("Hello\n");

#if !defined(CONFIG_TEST_AUTOMATIC_POWER_CONTROL)
enable_uart_rx();
#endif

printk("UART test transmission\n");
err = uart_tx(uart_dev, test_pattern, TEST_BUFFER_LEN, UART_ACTION_BASE_TIMEOUT_US);
if (err != 0) {
printk("Unexpected error when sending UART TX data: %d\n", err);
return -1;
}

#if !defined(CONFIG_TEST_AUTOMATIC_POWER_CONTROL)
disable_uart_rx();
#endif

printk("Good night\n");
k_msleep(2000);
}
Expand Down
5 changes: 4 additions & 1 deletion tests/benchmarks/multicore/idle_uarte/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ tests:
extra_args:
- SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpurad.conf
- DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_normal.overlay"
- CONFIG_TEST_AUTOMATIC_POWER_CONTROL=y
- CONFIG_PRINTK=y
- CONFIG_LOG=y
- CONFIG_CONSOLE=y
- CONFIG_UART_CONSOLE=y
harness_config:
fixture: gpio_loopback
pytest_root:
Expand Down
Loading