From 37158ebf15c8c299a1bc349bee206916842609f5 Mon Sep 17 00:00:00 2001 From: Mahesh Mahadevan Date: Mon, 6 Nov 2023 12:24:27 -0600 Subject: [PATCH] tests: counter: Add LPC RTC 1KHZ counter Add counter test support for the RTC 1KHz counter Signed-off-by: Mahesh Mahadevan --- .../boards/mimxrt685_evk_cm33_rtc_1khz.overlay | 7 +++++++ .../drivers/counter/counter_basic_api/src/test_counter.c | 5 ++++- tests/drivers/counter/counter_basic_api/testcase.yaml | 9 +++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 tests/drivers/counter/counter_basic_api/boards/mimxrt685_evk_cm33_rtc_1khz.overlay diff --git a/tests/drivers/counter/counter_basic_api/boards/mimxrt685_evk_cm33_rtc_1khz.overlay b/tests/drivers/counter/counter_basic_api/boards/mimxrt685_evk_cm33_rtc_1khz.overlay new file mode 100644 index 0000000000..3ee5af716e --- /dev/null +++ b/tests/drivers/counter/counter_basic_api/boards/mimxrt685_evk_cm33_rtc_1khz.overlay @@ -0,0 +1,7 @@ +&rtc { + status = "disabled"; +}; + +&rtc_highres { + status = "okay"; +}; diff --git a/tests/drivers/counter/counter_basic_api/src/test_counter.c b/tests/drivers/counter/counter_basic_api/src/test_counter.c index 370b07b248..642465c607 100644 --- a/tests/drivers/counter/counter_basic_api/src/test_counter.c +++ b/tests/drivers/counter/counter_basic_api/src/test_counter.c @@ -69,9 +69,12 @@ static const struct device *const devices[] = { #ifdef CONFIG_COUNTER_NXP_MRT DEVS_FOR_DT_COMPAT(nxp_mrt_channel) #endif -#ifdef CONFIG_COUNTER_MCUX_LPC_RTC +#ifdef CONFIG_COUNTER_MCUX_LPC_RTC_1HZ DEVS_FOR_DT_COMPAT(nxp_lpc_rtc) #endif +#ifdef CONFIG_COUNTER_MCUX_LPC_RTC_HIGHRES + DEVS_FOR_DT_COMPAT(nxp_lpc_rtc_highres) +#endif #ifdef CONFIG_COUNTER_GECKO_RTCC DEVS_FOR_DT_COMPAT(silabs_gecko_rtcc) #endif diff --git a/tests/drivers/counter/counter_basic_api/testcase.yaml b/tests/drivers/counter/counter_basic_api/testcase.yaml index 2173d417c0..f6210c0bc7 100644 --- a/tests/drivers/counter/counter_basic_api/testcase.yaml +++ b/tests/drivers/counter/counter_basic_api/testcase.yaml @@ -27,3 +27,12 @@ tests: timeout: 600 extra_configs: - CONFIG_COUNTER_RTC_STM32_SUBSECONDS=y + drivers.counter.basic_api.rtc_1khz: + tags: + - drivers + - counter + depends_on: counter + platform_allow: mimxrt685_evk_cm33 + timeout: 400 + extra_args: + DTC_OVERLAY_FILE="boards/mimxrt685_evk_cm33_rtc_1khz.overlay"