2019-11-01 13:45:29 +01:00
|
|
|
# STM32 Cube LL RTC
|
|
|
|
|
2018-11-29 11:08:41 +01:00
|
|
|
# Copyright (c) 2018, Linaro Limited
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
menuconfig COUNTER_RTC_STM32
|
|
|
|
bool "STM32 Counter RTC driver"
|
2023-06-13 15:12:01 +02:00
|
|
|
default y if !RTC
|
2022-07-21 23:33:07 +02:00
|
|
|
depends on DT_HAS_ST_STM32_RTC_ENABLED
|
2018-11-29 11:08:41 +01:00
|
|
|
select USE_STM32_LL_RTC
|
|
|
|
select USE_STM32_LL_PWR
|
|
|
|
select USE_STM32_LL_RCC
|
|
|
|
select USE_STM32_LL_EXTI
|
|
|
|
help
|
2020-07-24 12:31:46 +02:00
|
|
|
Build RTC driver for STM32 SoCs.
|
2023-03-17 13:24:58 +01:00
|
|
|
Tested on STM32 C0, F0, F2, F3, F4, F7, G0, G4, H7, L1, L4, L5, U5 series
|
2018-11-29 11:08:41 +01:00
|
|
|
|
2020-10-07 00:09:41 +02:00
|
|
|
if COUNTER_RTC_STM32
|
|
|
|
|
2018-11-29 11:08:41 +01:00
|
|
|
choice COUNTER_RTC_STM32_CLOCK_SRC
|
|
|
|
bool "RTC clock source"
|
2023-01-04 16:16:33 +01:00
|
|
|
optional
|
2018-11-29 11:08:41 +01:00
|
|
|
depends on COUNTER_RTC_STM32
|
|
|
|
|
|
|
|
config COUNTER_RTC_STM32_CLOCK_LSI
|
|
|
|
bool "LSI"
|
2023-01-04 16:16:33 +01:00
|
|
|
select DEPRECATED
|
2018-11-29 11:08:41 +01:00
|
|
|
help
|
|
|
|
Use LSI as RTC clock
|
2023-01-04 16:16:33 +01:00
|
|
|
Deprecated in favor of device tree secondary domain clock
|
2018-11-29 11:08:41 +01:00
|
|
|
|
|
|
|
config COUNTER_RTC_STM32_CLOCK_LSE
|
|
|
|
bool "LSE"
|
2023-01-04 16:16:33 +01:00
|
|
|
select DEPRECATED
|
2018-11-29 11:08:41 +01:00
|
|
|
help
|
|
|
|
Use LSE as RTC clock
|
2023-01-04 16:16:33 +01:00
|
|
|
Deprecated in favor of device tree secondary domain clock
|
2018-11-29 11:08:41 +01:00
|
|
|
|
|
|
|
endchoice #COUNTER_RTC_STM32_CLOCK_SRC
|
|
|
|
|
2021-03-12 10:24:24 +01:00
|
|
|
config COUNTER_RTC_STM32_SAVE_VALUE_BETWEEN_RESETS
|
|
|
|
bool "Save rtc time value between resets"
|
2023-02-07 14:28:31 +01:00
|
|
|
default n
|
2021-03-12 10:24:24 +01:00
|
|
|
help
|
2023-02-07 14:28:31 +01:00
|
|
|
Keep the counter value after each reset.
|
2021-03-12 10:24:24 +01:00
|
|
|
|
2023-08-16 11:45:55 +02:00
|
|
|
config COUNTER_RTC_STM32_SUBSECONDS
|
|
|
|
bool "Use the subseconds as a basic tick."
|
|
|
|
depends on !SOC_SERIES_STM32F1X
|
|
|
|
help
|
|
|
|
Use the subseconds as the basic time tick. It increases resolution
|
|
|
|
of the counter. The frequency of the time is RTC Source Clock divided
|
|
|
|
by 2. It is the clock after the first asynchronous prescaler.
|
|
|
|
The config increases power consumption.
|
|
|
|
|
2020-10-07 00:09:41 +02:00
|
|
|
endif # COUNTER_RTC_STM32
|