walnux/boards/arm/stm32h7
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
..
linum-stm32h753bi style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
nucleo-h743zi arch/arm/stm32h7: Port timer capture driver from stm32 2025-08-07 10:46:39 -03:00
nucleo-h743zi2 style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
nucleo-h745zi style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
openh743i style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
stm32h745i-disco [Kconfig] boards/arm: Fix Kconfig style 2025-07-29 17:28:46 +02:00
stm32h747i-disco style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
stm32h750b-dk [Kconfig] boards/arm: Fix Kconfig style 2025-07-29 17:28:46 +02:00
weact-stm32h743 boards/weact-stm32h743: Add support to ST7735 display 2025-07-29 08:18:30 -03:00