Commit Graph

136 Commits

Author SHA1 Message Date
Declan Snyder
fef0018cca soc: lpc55xxx: Support, enable, test NXP MRT
Support NXP MRT on LPC55XXX SOC series, enable on
lpcxpresso55s69_cpu0, add test overlay to counter basic api test

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-10 10:40:54 +01:00
Declan Snyder
8257ff8f6a tests: counter: Update for NXP MRT
Update counter test to test NXP MRT devices

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-10 10:40:54 +01:00
Erwan Gouriou
614df97a49 tests: counter_basic_api: Test subseconds on nucleo_wba52cg
Enable STM32 RTC subsecond test on nucleo_wba52cg.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-11-08 15:11:27 +00:00
Anas Nashif
345735d0a8 tests: remove CONFIG_ZTEST_NEW_API in all tests
Remove all usage of CONFIG_ZTEST_NEW_API from tests and sample as this
is now enabled by default.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:04:29 +02:00
Manuel Argüelles
fcdf31521f tests: counter: enable RTU.PIT tests for s32z270dc2_r52 boards
Enable testing RTU.PIT on s32z270dc2_r52 boards.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-09-29 09:47:35 +02:00
Dawid Niedzwiecki
49f9aa7d12 counter: stm32 rtc: handle sub second registers
Add support for using the sub second registers. It allows reading and
setting alarm with the sub second tick resolution.

The RTC module is configured to get as high frequency as possible, which
equals the source clock (RTCCLK) divided by 2. To get such frequency,
the asynchronous prescaler is set to 1.

According to RM, setting the asynchronous prescaler to a high value
minimize consumption, so the change increase the power consumption.

Use a config to enable the sub second support.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-09-26 15:05:35 +02:00
YuLong Yao
b89e90b2b5 tests: drivers: counter: add esp32s3_luatos_core
add overlay for esp32s3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-22 15:58:11 +02:00
YuLong Yao
4337bbab82 tests: drivers: counter: add esp32c3_luatos_core
add overlay for esp32c3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-15 14:17:50 +02:00
TOKITA Hiroshi
5119af0422 tests: counter: counter_basic_api: Add support for rpi_pico boards
Add support for rpi_pico board.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-09-13 16:18:44 +02:00
Lucas Tamborrino
c8d7dfd6f8 tests: drivers: counter: add esp32 wrover
Add esp32_devkitc_wrover board overlay

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-08-16 10:25:49 +02:00
Julio Cesar
5e15e8cb48 boards: xtensa: Add support for YD-ESP32 board
Add `yd_esp32` board:

- Model name: YD-ESP32
- Manufacturer: VCC-GND® Studio
- Espressif module: ESP32-WROOM-32E

Signed-off-by: Julio Cesar <hi@jcsx.dev>
2023-08-15 11:15:39 +00:00
Daniel Leung
121b4d2d62 tests: drivers: rename shadow variables
Renames shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-10 08:14:12 +00:00
Sreeram Tatapudi
fa471172b7 drivers: counter: cat1: Fix test_single_shot_alarm_notop
TC "test_single_shot_alarm_notop" is failing because there were 2 ISR
callbacks instead of one. this is because of invoking
ifx_cat1_counter_set_int_pending incorrectly. Updated
ifx_cat1_counter_set_alarm to fix this

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-08-10 08:13:11 +00:00
Pavlo Havrylyuk
f4a1d40924 drivers: counter: Add Infineon CAT1 counter driver
Add initial version of Infineon CAT1 counter driver
Add initial version of binding file for Infineon
Add counters to psco6 dtsi
Add external trigger pin that runs counter

Signed-off-by: Pavlo Havrylyuk <pavlo.havrylyuk@infineon.com>
2023-07-26 09:10:31 +02:00
Marek Matej
3776402f40 boards: xtensa: esp32 board split
Remove virtual esp32 board and replace it with the
real word boards:

- esp32_devkitc_wroom
- esp32_devkitc_wrover (with PSRAM option)

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-07-25 18:12:33 +02:00
Erwan Gouriou
9e2e3cf090 tests: driver: counter: Add stm32wba target
Add stm32wba target to verify driver implementation

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-07-20 16:25:02 +02:00
Jerzy Kasenberg
d58b315165 tests: drivers: counter: basic_api: add overlay for da1469x_dk_pro
Overlay adds 4 timers for testing and selects various frequencies
to select high speed (DIVN) and low-speed (LP-CLK) as sources.
Different  prescalers are applied for different timers to
test wider range of conditions.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2023-07-05 13:00:50 +02:00
Gerard Marull-Paretas
93b63df762 samples, tests: convert string-based twister lists to YAML lists
Twister now supports using YAML lists for all fields that were written
as space-separated lists. Used twister_to_list.py script. Some artifacts
on string length are due to how ruamel dumps content.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-10 09:52:37 +02:00
Francois Ramu
739ffd8a46 tests: drivers: counter running on stm32 timer-counter instances
Defines the overlay to Use the stm32 counter-timer in addition
to the rtc (if enabled)
to pass the tests/drivers/counter/counter_basic_api/
Enable all the possible timer nodes on each board.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-24 13:32:29 +02:00
Francois Ramu
b46ecf27d5 tests: drivers: counter basic api running on the stm32h573i_dk
Run the tests/drivers/counter/counter_basic_api on the stm32h573i_dk
disco kit, enabling the counter mode for the GP Timers2 & Timers3
Prescaler is giving a 1MHz freq

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-05 10:39:19 +00:00
Krzysztof Chruscinski
fc4606da02 tests: drivers: counter: nrf_rtc: Add delay in the test
Some Nordic platforms start counter with the delay and
test_short_relative_alarm test expects very early alarm,
just after starting the counter. Adding the delay which
is applicable only for counter based on Nordic RTC peripheral.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-04-03 11:28:59 +02:00
Krzysztof Chruscinski
3b5c059cf4 Revert "tests: drivers: counter: Relax timing requirement"
This reverts commit 51f452bbf0.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-04-03 11:28:59 +02:00
Krzysztof Chruscinski
656b0e6426 drivers: counter: Adapt to use device tree
Modifying counter drivers (rtc and timer) to rely completely on
device tree and not on Kconfig of MDK flags.

Adapting dtsi for all SoCs and adapting test configuration.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-03-20 16:59:40 +01:00
Krzysztof Chruscinski
51f452bbf0 tests: drivers: counter: Relax timing requirement
In short_relative_capable test it is possible that short alarm
setting is repeated few times and it is possible that alarm
does not expire shortely after setting. Increase the delay after
expiration is checked.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-03-20 16:49:50 +01:00
Ben Marsh
1cec2af0cb tests: drivers: counter: counter_basic_api: Add stm32h735g_disco overlay
Add overlay for stm32h735g_disco board to enable counter_basic_api tests
on this board

Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
2023-03-20 09:53:59 +01:00
Ryan McClelland
63652b38a1 tests: drivers: counter: basic_api: add overlay for stm32h747i_disco_m7
Add overlay for stm32h747i_disco_m7 to enable counter_basic_api
tests on this board. The prescalers of the timers will result
in a counter frequency of 1 MHz.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-03-20 09:51:19 +01:00
Lucas Tamborrino
cf3b264337 tests: driver: counter: Add esp32s3 to basic api test
Add esp32s3 to counter basic api testing

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-03-14 10:50:37 +01:00
Guillaume Gautier
45b0804550 tests: drivers: counter: counter_basic_api: src: Fix STM32 RTC device
Commit fd65800 introduced a regression for the counter_basic_api test for
STM32 by using a Silabs Gecko Kconfig to enable the STM32 RTC.
This commit uses the proper STM32 Kconfig for the RTC instead.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-01-09 10:14:06 +01:00
Mateusz Sierszulski
fd658004d7 tests: drivers: counter: counter_basic_api support in counter_gecko_stimer
This commit adds test support for the counter_gecko_stimer
driver.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2022-12-20 22:50:19 +01:00
TOKITA Hiroshi
fb02624eda tests: counter: counter_basic_api: add support for GD32 boards
Add support for boards that implements the GD32 SoCs.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-12-12 10:08:12 +01:00
Manuel Arguelles
0ba7505bc8 tests: counter: support System Timer on s32z270dc2_r52
Enable counter_basic_api test for s32z270dc2_r52 boards, using
System Timer counter instances with different prescaler values.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2022-11-30 11:29:39 +01:00
Anas Nashif
67e8d03280 tests/samples: fix some missing tags
Many driver samples or tests only had 'drivers' as the tag, without a
tag indicating what driver that is exactly, so add some missing tags.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-14 07:08:04 -05:00
Sylvio Alves
7891bed6e7 tests: counter: add esp32 test case
Adds only ESP32 board test case.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-09-19 18:37:28 +02:00
Hu Zhenyu
0d0f2e94a2 tests: counter_basic_api will return pass even if no counter is found
In test_all_instances(), if ARRAY_SIZE(devices) is 0, the test is not
performed. At this time, the test result should be TC_FAIL, instead of
TC_PASS. A zassert is needed to filter this case.
Fixes: #45647

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-09-09 16:32:07 -04:00
Enjia Mai
0051a3abaa tests: drivers: move the counter basic test to new ztest API
Migrate the testsuite tests/drivers/counter/counter_basic_api
to the new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-05 10:13:43 +00:00
Gerard Marull-Paretas
e0125d04af devices: constify statically initialized device pointers
It is frequent to find variable definitions like this:

```c
static const struct device *dev = DEVICE_DT_GET(...)
```

That is, module level variables that are statically initialized with a
device reference. Such value is, in most cases, never changed meaning
the variable can also be declared as const (immutable). This patch
constifies all such cases.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Glauber Maroto Ferreira
350b57c346 esp32: counter: tests: remove deprecated conf file
Remove unused/deprecated conf file from counter API
test.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-08-08 13:00:38 -05:00
Fabio Baltieri
def230187b test: fix more legacy #include paths
Add a bunch of missing "zephyr/" prefixes to #include statements in
various test and test framework files.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-02 16:41:41 +01:00
Kumar Gala
16eb5a026f tests: counter: counter_basic_api: Rework test to use struct device
Move to pass 'struct device *' instead of a 'char *'.  This lets us move
from device_get_binding to DEVICE_DT_GET.

Reworked get_counter_period_us() to not be name based, but instead
we keep a list of devices that need a different period value to check
against.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-20 08:32:04 -05:00
Kumar Gala
d8dca94144 tests: counter_basic_api: refactor period handling
We do the same check for determining the period in a number of the
tests.  Refactor that code into get_counter_period_us().

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-20 08:32:04 -05:00
Jan Kablitz
8e79af0eca tests: drivers: counter: basic_api: add overlay for nucleo_l476rg
Add overlay for nucleo_l476rg to enable counter_basic_api
tests on this board. The prescalers of the timers will result
in a counter frequency of 1 MHz.

Signed-off-by: Jan Kablitz <kabeljant@gmail.com>
2022-07-13 21:34:19 +02:00
Jan Kablitz
95678f3434 tests: drivers: counter: basic_api: add overlay for nucleo_l433rc_p
Add overlay for nucleo_l433rc_p to enable counter_basic_api
tests on this board. The prescalers of the timers will result
in a counter frequency of 1 MHz.

Signed-off-by: Jan Kablitz <kabeljant@gmail.com>
2022-07-13 21:34:19 +02:00
Hake Huang
3051ba19f0 tests: counter: disable driver debug message
to avoid log log in test report, disable driver debug message

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-07-04 16:21:02 +02:00
Mahesh Mahadevan
a8c7f82510 tests: counter: Fix test_multiple_alarms in counter_basic_api
Skip the test_multiple_alarms() test when the settop value is
not supported. This is to avoid the case where wrap around
take a long time thereby causing test failures

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-05-23 08:38:59 -05:00
Gerard Marull-Paretas
ade7ccb918 tests: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all tests to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 20:02:14 +02:00
Jan Peters
88ca4fb533 tests: drivers: counter: add mimxrt QTMR to counter_basic_api test
to test basic functionality of the new mcux_qtmr counter driver.

Signed-off-by: Jan Peters <peters@kt-elektronik.de>
2022-05-03 20:41:23 -05:00
Mahesh Mahadevan
6a66493703 tests: counter: Update test_multiple_alarms test
Set the top value relative to the current time. This is
so that we avoid the case of setting the top value that
is prior to the current value.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-04-28 10:26:54 +02:00
Katarzyna Giadla
681e3a16c7 tests: Change duplicated names of the test cases
Some names of the test cases are duplicated within the project.
This commit contains the proposed names of the test scenarios.

Signed-off-by: Katarzyna Giadla <katarzyna.giadla@nordicsemi.no>
2022-03-30 17:42:01 -04:00
Nazar Kazakov
f483b1bc4c everywhere: fix typos
Fix a lot of typos

Signed-off-by: Nazar Kazakov <nazar.kazakov.work@gmail.com>
2022-03-18 13:24:08 -04:00
Krzysztof Chruscinski
47ae656cc1 all: Deprecate UTIL_LISTIFY and replace with LISTIFY
UTIL_LISTIFY is deprecated. Replacing it with LISTIFY.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-03-08 11:03:30 +01:00