1# Copyright (c) 2020, STMicroelectronics 2# SPDX-License-Identifier: Apache-2.0 3 4description: | 5 STM32 lptim : low power timer 6 The lptim node to be used for counting ticks during lowpower modes 7 must be named stm32_lp_tick_source in the DTS, as follows: 8 stm32_lp_tick_source: &lptim1 { 9 status = "okay"; 10 } 11 12compatible: "st,stm32-lptim" 13 14include: 15 - name: st,stm32-timers.yaml 16 property-blocklist: 17 # 'resets' property is not supported yet 18 - resets 19 - st,prescaler 20 - st,countermode 21 22properties: 23 st,prescaler: 24 type: int 25 default: 1 26 description: | 27 Clock divider at the input of the lptimer clock, default reset value is 'not divided'. 28 29 Prescaler allows to achieve higher LPTIM timeout (up to 256s when lptim clocked by LSE) 30 and consequently higher core sleep durations, but impacts the tick precision. 31 To be used with caution. 32 CONFIG_SYS_CLOCK_TICKS_PER_SEC could be used to tune tick duration and gain precision, 33 at kernel timing granularity cost. 34 35 For example, when LPTIM is clocked by the LSE (32768Hz) and st,prescaler = <32>: 36 LPTIM global timeout is 64 seconds with an increment of 0.97 ms. 37 Using CONFIG_SYS_CLOCK_TICKS_PER_SEC = 4096, tick = 0.24 ms, LPTIM precision is 4 ticks. 38 Using CONFIG_SYS_CLOCK_TICKS_PER_SEC = 1024, tick = 0.97 ms, LPTIM precision is 1 ticks. 39 enum: 40 - 1 41 - 2 42 - 4 43 - 8 44 - 16 45 - 32 46 - 64 47 - 128 48