1# STM32 LPTIM configuration options 2 3# Copyright (c) 2019 STMicroelectronics 4# SPDX-License-Identifier: Apache-2.0 5 6menuconfig STM32_LPTIM_TIMER 7 bool "STM32 Low Power Timer [EXPERIMENTAL]" 8 default y 9 depends on DT_HAS_ST_STM32_LPTIM_ENABLED 10 depends on CLOCK_CONTROL && PM 11 select TICKLESS_CAPABLE 12 select EXPERIMENTAL 13 help 14 This module implements a kernel device driver for the LowPower Timer 15 and provides the standard "system clock driver" interfaces. 16 17if STM32_LPTIM_TIMER 18 19choice STM32_LPTIM_CLOCK 20 prompt "LPTIM clock value configuration" 21 help 22 This option is deprecated and configuration of LPTIM domain clock 23 using devicetree should be preferred. 24 25config STM32_LPTIM_CLOCK_LSI 26 bool "LSI" 27 help 28 Use LSI as LPTIM clock 29 30config STM32_LPTIM_CLOCK_LSE 31 bool "LSE" 32 help 33 Use LSE as LPTIM clock 34 35endchoice 36 37config STM32_LPTIM_CLOCK 38 int "LPTIM clock value" 39 default 32768 if STM32_LPTIM_CLOCK_LSE 40 default 32000 if STM32_LPTIM_CLOCK_LSI 41 42config STM32_LPTIM_TIMEBASE 43 hex "LPTIM AutoReload value" 44 default 0xFFFF if STM32_LPTIM_CLOCK_LSE 45 default 0xF9FF if STM32_LPTIM_CLOCK_LSI 46 47config STM32_LPTIM_TICK_FREQ_RATIO_OVERRIDE 48 bool "Override tick to freq ratio check" 49 default y if ZTEST 50 help 51 For LPTIM configuration, a specific tick freq is advised 52 depending on LPTIM input clock: 53 - LSI(32KHz): 4000 ticks/sec 54 - LSE(32678): 4096 ticks/sec 55 To prevent misconfigurations, a dedicated check is implemented 56 in the driver. 57 This options allows to override this check 58 59endif # STM32_LPTIM_TIMER 60