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> |
||
|---|---|---|
| .github | ||
| arch | ||
| audio | ||
| binfmt | ||
| boards | ||
| cmake | ||
| crypto | ||
| Documentation | ||
| drivers | ||
| dummy | ||
| fs | ||
| graphics | ||
| include | ||
| libs | ||
| mm | ||
| net | ||
| openamp | ||
| pass1 | ||
| sched | ||
| syscall | ||
| tools | ||
| video | ||
| wireless | ||
| .asf.yaml | ||
| .codespell-ignore-lines | ||
| .codespellrc | ||
| .gitignore | ||
| .gitmessage | ||
| .pre-commit-config.yaml | ||
| .yamllint | ||
| AUTHORS | ||
| CMakeLists.txt | ||
| CONTRIBUTING.md | ||
| flake.lock | ||
| flake.nix | ||
| INVIOLABLES.md | ||
| Kconfig | ||
| LICENSE | ||
| Makefile | ||
| NOTICE | ||
| README.md | ||
| ReleaseNotes | ||
Apache NuttX is a real-time operating system (RTOS) with an emphasis on standards compliance and small footprint. Scalable from 8-bit to 64-bit microcontroller environments, the primary governing standards in NuttX are POSIX and ANSI standards. Additional standard APIs from Unix and other common RTOSs (such as VxWorks) are adopted for functionality not available under these standards, or for functionality that is not appropriate for deeply-embedded environments (such as fork()).
For brevity, many parts of the documentation will refer to Apache NuttX as simply NuttX.
Getting Started
First time on NuttX? Read the Getting Started guide! If you don't have a board available, NuttX has its own simulator that you can run on terminal.
Documentation
You can find the current NuttX documentation on the Documentation Page.
Alternatively, you can build the documentation yourself by following the Documentation Build Instructions.
The old NuttX documentation is still available in the Apache wiki.
Supported Boards
NuttX supports a wide variety of platforms. See the full list on the Supported Platforms page.
Contributing
If you wish to contribute to the NuttX project, read the Contributing guidelines for information on Git usage, coding standard, workflow and the NuttX principles.
License
The code in this repository is under either the Apache 2 license, or a license compatible with the Apache 2 license. See the License Page for more information.