walnux/drivers/timers
Côme VINCENT 2771df6250 arch/arm/stm32h7: Port timer capture driver from stm32
This commit introduces a timer capture driver for the STM32H7 series
ported from the STM32 F series.

The main changes include:
- A new generic timer capture driver for STM32H7.
- A lower-half driver to integrate with the NuttX capture subsystem.
- Kconfig options to enable and configure capture for various timers.
- Pin definitions for TIM1-4 capture inputs on the nucleo-h743zi.
- An update to `cap_register_multiple` to handle multiple device registration.
- An update to `stm32_bringup` to register the capture drivers.

The current implementation is based on a driver originally for PWM input,
and as such, it calculates duty cycle and frequency. It is also limited
to a single capture channel per timer.

The original implementation's `stm32_cap_init` in
`arch/arm/src/stm32h7/stm32_capture.c` has been modified to accept a
channel number instead of using a hardcoded 0 through
`STM32_CAP_CHANNEL_COUNTER`.

This serves as a foundation for future development of more comprehensive
input capture capabilities on STM32H7 platforms.

Tested by polling and reading `/dev/cap0-4` with
`ioctl(fds[i], CAPIOC_FREQUENCE, freq)` while sending a square wave signal to
appropriate pins and checking frequency.

Also tested by bypassing upper half driver and setting up capture on
TIM4 channels 1-4 as explained in #16762.

Signed-off-by: Côme VINCENT <44554692+comejv@users.noreply.github.com>
2025-08-07 10:46:39 -03:00
..
arch_alarm.c arch: Flag all definitions of up_perf_* functions with CONFIG_ARCH_HAVE_PERF_EVENTS 2025-06-06 17:31:10 +08:00
arch_rtc.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
arch_timer.c arch: Flag all definitions of up_perf_* functions with CONFIG_ARCH_HAVE_PERF_EVENTS 2025-06-06 17:31:10 +08:00
capture.c arch/arm/stm32h7: Port timer capture driver from stm32 2025-08-07 10:46:39 -03:00
CMakeLists.txt drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
cs2100-cp.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
ds3231.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
ds3231.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
goldfish_timer.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
Kconfig style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
Make.defs drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
mcp794xx.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
mcp794xx.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
oneshot.c drivers: unify Private Types banners 2025-05-28 10:17:15 +08:00
pcf85263.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
pcf85263.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
pl031.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
pwm.c drivers: unify Private Types banners 2025-05-28 10:17:15 +08:00
rpmsg_rtc.c fix compile error 2025-01-08 09:28:58 +08:00
rtc.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
rx8010.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
rx8010.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
timer.c drivers: unify Private Types banners 2025-05-28 10:17:15 +08:00
watchdog.c drivers: unify Private Types banners 2025-05-28 10:17:15 +08:00