This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 83fa616f10cb574877b02018e3b2660c6a9899d0 Author: raiden00pl <[email protected]> AuthorDate: Tue Nov 3 11:20:20 2026 +0100 Documentation/stm32_nucleo: Document the common timer devices. List the BOARD_STM32_COMMON timer and oneshot options with their device names, and require STM32_LPTIMn_CLKIN in board.h for every LPTIM. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: raiden00pl <[email protected]> --- .../guides/chip-specific/stm32_nucleo.rst | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Documentation/guides/chip-specific/stm32_nucleo.rst b/Documentation/guides/chip-specific/stm32_nucleo.rst index 635ca332b52..f5a04b92209 100644 --- a/Documentation/guides/chip-specific/stm32_nucleo.rst +++ b/Documentation/guides/chip-specific/stm32_nucleo.rst @@ -62,8 +62,31 @@ I2C ``CONFIG_I2C_DRIVER`` ``/dev/i2cN`` for every enabled The file systems are not mounted when ``CONFIG_DISABLE_MOUNTPOINT`` is set. The IWDG uses ``STM32_LSI_FREQUENCY`` from the board ``board.h``. +Timers +------ + +Timer and oneshot devices are registered from one option per instance, +N being the TIM or LPTIM instance number: + +============================================ =================== +Option Device +============================================ =================== +``CONFIG_BOARD_STM32_COMMON_TIMn_TIMER`` ``/dev/timerN`` +``CONFIG_BOARD_STM32_COMMON_TIMn_ONESHOT`` ``/dev/oneshotN`` +``CONFIG_BOARD_STM32_COMMON_LPTIMn_TIMER`` ``/dev/lptimerN`` +``CONFIG_BOARD_STM32_COMMON_LPTIMn_ONESHOT`` ``/dev/lponeshotN`` +============================================ =================== + +The options need ``CONFIG_TIMER`` or ``CONFIG_ONESHOT`` (a TIM oneshot +also ``CONFIG_STM32_ONESHOT``) and the ``CONFIG_STM32_TIMn`` or +``CONFIG_STM32_LPTIMn`` instance. An instance is either a timer or a +oneshot. A TIM oneshot counts in microseconds. An LPTIM counts on its +kernel clock, ``STM32_LPTIMn_CLKIN`` in the board ``board.h``. + Rules for boards: - Do not repeat any of the features above in the board directory. - Board-independent initialization is added to ``stm32_common_initialize()``, not to individual boards. +- ``board.h`` defines ``STM32_LPTIMn_CLKIN`` for every LPTIM instance of + the chip.
