zephyr/drivers/timer/Kconfig.stm32_lptim
Aurelien Jarno e4b62a8ce2 drivers: timer: lptim: depend on SYS_POWER_MANAGEMENT
The LPTIM driver is supposed to be only available when the SoC is
allowed to enter power sleep mode, as described in commit f30f5fff72
("drivers: timer: lptim is [EXPERIMENTAL] for stm32 soc series only").

For that it should depends on SYS_POWER_MANAGEMENT (which gates the
SYS_POWER_SLEEP_STATES and SYS_POWER_DEEP_SLEEP_STATES options) instead
of DEVICE_POWER_MANAGEMENT.

Fixes #25989

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2020-06-09 08:15:56 -04:00

43 lines
1,011 B
Plaintext

# STM32 LPTIM configuration options
# Copyright (c) 2019 STMicroelectronics
# SPDX-License-Identifier: Apache-2.0
menuconfig STM32_LPTIM_TIMER
bool "STM32 Low Power Timer [EXPERIMENTAL]"
depends on (SOC_SERIES_STM32L4X || SOC_SERIES_STM32WBX)
depends on CLOCK_CONTROL && SYS_POWER_MANAGEMENT
select TICKLESS_CAPABLE
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"
config STM32_LPTIM_CLOCK_LSE
bool "LSE"
help
Use LSE as LPTIM clock
config STM32_LPTIM_CLOCK_LSI
bool "LSI"
help
Use LSI as LPTIM clock
endchoice
config STM32_LPTIM_CLOCK
int "LPTIM clock value"
default 32768 if STM32_LPTIM_CLOCK_LSE
default 32000 if STM32_LPTIM_CLOCK_LSI
config STM32_LPTIM_TIMEBASE
hex "LPTIM AutoReload value"
default 0xFFFF if STM32_LPTIM_CLOCK_LSE
default 0xF9FF if STM32_LPTIM_CLOCK_LSI
endif # STM32_LPTIM_TIMER