walnux/arch
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
..
arm arch/arm/stm32h7: Port timer capture driver from stm32 2025-08-07 10:46:39 -03:00
arm64 arch/*/*_sigdeliver.c: Fix a race condition is signal delivery for SMP 2025-08-04 21:11:13 +08:00
avr arch/avr/avrdx/avrdx_serial: make uart_ops_s structure const 2025-07-10 12:21:40 -03:00
ceva Revert "Reduce the size of tcb by four bytes." 2025-05-27 16:30:35 +08:00
dummy
hc style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
mips arch: unify Private Types banners 2025-05-28 10:17:15 +08:00
misoc Revert "Reduce the size of tcb by four bytes." 2025-05-27 16:30:35 +08:00
or1k Revert "Reduce the size of tcb by four bytes." 2025-05-27 16:30:35 +08:00
renesas Revert "Reduce the size of tcb by four bytes." 2025-05-27 16:30:35 +08:00
risc-v bugix/risc-v/esp32c6: Fix build error of LP_I2C 2025-08-05 08:00:12 -03:00
sim arch/sim: avoid host-call being interrupted before getting errno 2025-07-21 19:19:05 -03:00
sparc arch/*/*_sigdeliver.c: Fix a race condition is signal delivery for SMP 2025-08-04 21:11:13 +08:00
tricore Revert "Reduce the size of tcb by four bytes." 2025-05-27 16:30:35 +08:00
x86 toolchain: Support KASAN compilation above Clang18 2025-06-26 20:31:19 +08:00
x86_64 x86_64: allow specifying alternative compilers via CROSSDEV, rather than restricting to specific compiler 2025-07-30 02:41:29 +08:00
xtensa arch/xtensa: Fix a race condition in xtensa_sig_deliver for SMP 2025-08-01 08:54:39 -03:00
z16 Revert "Reduce the size of tcb by four bytes." 2025-05-27 16:30:35 +08:00
z80 Revert "Reduce the size of tcb by four bytes." 2025-05-27 16:30:35 +08:00
CMakeLists.txt arch/z80: migrate to SPDX identifier 2024-12-02 17:23:25 +08:00
Kconfig toolchain/armclang: Fix armclang config 2025-07-15 21:56:46 +08:00