2019-11-18 19:01:42 +08:00
|
|
|
# STM32 LPTIM configuration options
|
|
|
|
|
2019-11-08 17:17:08 +08:00
|
|
|
# Copyright (c) 2019 STMicroelectronics
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
menuconfig STM32_LPTIM_TIMER
|
2020-05-26 21:40:17 +08:00
|
|
|
bool "STM32 Low Power Timer [EXPERIMENTAL]"
|
2022-08-22 22:47:05 +08:00
|
|
|
default y
|
|
|
|
depends on DT_HAS_ST_STM32_LPTIM_ENABLED
|
2020-09-02 06:31:40 +08:00
|
|
|
depends on CLOCK_CONTROL && PM
|
2019-11-08 17:17:08 +08:00
|
|
|
select TICKLESS_CAPABLE
|
2021-10-15 20:28:18 +08:00
|
|
|
select EXPERIMENTAL
|
2019-11-08 17:17:08 +08:00
|
|
|
help
|
|
|
|
This module implements a kernel device driver for the LowPower Timer
|
|
|
|
and provides the standard "system clock driver" interfaces.
|
|
|
|
|
|
|
|
if STM32_LPTIM_TIMER
|
|
|
|
|
|
|
|
choice STM32_LPTIM_CLOCK
|
|
|
|
prompt "LPTIM clock value configuration"
|
2022-08-05 21:59:38 +08:00
|
|
|
help
|
|
|
|
This option is deprecated and configuration of LPTIM domain clock
|
|
|
|
using devicetree should be preferred.
|
2019-11-08 17:17:08 +08:00
|
|
|
|
2020-05-26 21:40:17 +08:00
|
|
|
config STM32_LPTIM_CLOCK_LSI
|
|
|
|
bool "LSI"
|
|
|
|
help
|
|
|
|
Use LSI as LPTIM clock
|
|
|
|
|
2021-10-01 20:56:14 +08:00
|
|
|
config STM32_LPTIM_CLOCK_LSE
|
|
|
|
bool "LSE"
|
|
|
|
help
|
|
|
|
Use LSE as LPTIM clock
|
|
|
|
|
2019-11-08 17:17:08 +08:00
|
|
|
endchoice
|
|
|
|
|
|
|
|
config STM32_LPTIM_CLOCK
|
|
|
|
int "LPTIM clock value"
|
|
|
|
default 32768 if STM32_LPTIM_CLOCK_LSE
|
2020-05-26 21:40:17 +08:00
|
|
|
default 32000 if STM32_LPTIM_CLOCK_LSI
|
2019-11-08 17:17:08 +08:00
|
|
|
|
|
|
|
config STM32_LPTIM_TIMEBASE
|
|
|
|
hex "LPTIM AutoReload value"
|
|
|
|
default 0xFFFF if STM32_LPTIM_CLOCK_LSE
|
2020-05-26 21:40:17 +08:00
|
|
|
default 0xF9FF if STM32_LPTIM_CLOCK_LSI
|
2019-11-08 17:17:08 +08:00
|
|
|
|
|
|
|
endif # STM32_LPTIM_TIMER
|