1# Copyright (c) 2020, STMicroelectronics
2# SPDX-License-Identifier: Apache-2.0
3
4description: STM32 timers
5
6compatible: "st,stm32-timers"
7
8include: [base.yaml, reset-device.yaml]
9
10properties:
11  reg:
12    required: true
13
14  clocks:
15    required: true
16
17  resets:
18    required: true
19
20  st,prescaler:
21    type: int
22    required: true
23    description: |
24      Clock prescaler at the input of the timer
25      Could be in range [0 .. 0xFFFF] for STM32 General Purpose Timers (CLK/(prescaler+1) )
26
27  st,countermode:
28    type: int
29    default: 0 # STM32_TIM_COUNTERMODE_UP - reset state
30    description: |
31      Sets timer counter mode.
32
33      Use constants defined in dt-bindings/timer/stm32-timer.h.
34
35      * STM32_TIM_COUNTERMODE_UP             - used as upcounter.
36      * STM32_TIM_COUNTERMODE_DOWN           - used as downcounter.
37      * STM32_TIM_COUNTERMODE_CENTER_DOWN    - counts up and down alternatively.
38                                               Output compare interrupt flags of output channels
39                                               are set only when the counter is counting down.
40      * STM32_TIM_COUNTERMODE_CENTER_UP      - counts up and down alternatively.
41                                               Output compare interrupt flags of output channels
42                                               are set only when the counter is counting up.
43      * STM32_TIM_COUNTERMODE_CENTER_UP_DOWN - counts up and down alternatively.
44                                               Output compare interrupt flags of output channels
45                                               are set only when the counter is counting up or
46                                               down.
47
48      If absent, then STM32_TIM_COUNTERMODE_UP is used (reset state).
49