1choice RTC_CLK_SRC
2    prompt "RTC clock source"
3    default RTC_CLK_SRC_INT_RC
4    help
5        Choose which clock is used as RTC clock source.
6
7    config RTC_CLK_SRC_INT_RC
8        bool "Internal 136kHz RC oscillator"
9    config RTC_CLK_SRC_EXT_OSC
10        bool "External 32kHz oscillator at pin0"
11    config RTC_CLK_SRC_INT_8MD256
12        bool "Internal 17.5MHz oscillator, divided by 256"
13endchoice
14
15config RTC_CLK_CAL_CYCLES
16    int "Number of cycles for RTC_SLOW_CLK calibration"
17    default 3000 if RTC_CLK_SRC_EXT_OSC || RTC_CLK_SRC_INT_8MD256
18    default 1024 if RTC_CLK_SRC_INT_RC
19    range 0 8190 if RTC_CLK_SRC_EXT_OSC || RTC_CLK_SRC_INT_8MD256
20    range 0 32766 if RTC_CLK_SRC_INT_RC
21    help
22        When the startup code initializes RTC_SLOW_CLK, it can perform
23        calibration by comparing the RTC_SLOW_CLK frequency with main XTAL
24        frequency. This option sets the number of RTC_SLOW_CLK cycles measured
25        by the calibration routine. Higher numbers increase calibration
26        precision, which may be important for applications which spend a lot of
27        time in deep sleep. Lower numbers reduce startup time.
28
29        When this option is set to 0, clock calibration will not be performed at
30        startup, and approximate clock frequencies will be assumed:
31
32        - 150000 Hz if internal RC oscillator is used as clock source. For this use value 1024.
33        - 32768 Hz if the 32k crystal oscillator is used. For this use value 3000 or more.
34            In case more value will help improve the definition of the launch of the crystal.
35            If the crystal could not start, it will be switched to internal RC.
36