summaryrefslogtreecommitdiff
path: root/components/drivers/rtc/Kconfig
blob: 176b185e53627d5375076a73b4d7e606e337c8ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
menuconfig RT_USING_RTC
    bool "Using RTC device drivers"
    default n
    help
      Enable the RTC core so hardware real-time clocks can be registered via
      `rt_hw_rtc_register`, the kernel can keep wall clock time across suspend/
      resume, and applications can query or set calendar values through the
      `rtc` character device. Turn this on whenever you have a peripheral or
      PMIC that supplies timestamp/backup registers referenced from the device
      tree; disable it only on chips that genuinely lack RTC hardware.

    if RT_USING_RTC
        config RT_USING_ALARM
            bool "Using RTC alarm"
            default n
            help
              Spawn the alarm service defined in `dev_alarm.c`. The driver
              creates an RT-Thread worker thread that reconciles user-space
              alarms with the RTC wakeup registers, automatically reprograms
              oneshot/periodic alarms, and raises callbacks when the hardware
              interrupt fires. Enable this if your application needs wakeup at a
              given date/time; leave it disabled to save RAM/CPU when alarms are
              not used.

        if RT_USING_ALARM
            config RT_ALARM_STACK_SIZE
                int "stack size for alarm thread"
                default IDLE_THREAD_STACK_SIZE
                help
                  Specify the stack size (bytes) used by the internal alarm
                  management thread. Increase this when alarm callbacks perform
                  complex logic or use libc time conversions; shrink it on very
                  constrained MCUs when you are sure the callbacks stay shallow.

            config RT_ALARM_TIMESLICE
                int "timeslice for alarm thread"
                default 5
                help
                  Define the timeslice (OS ticks) granted to the alarm thread
                  when it runs at the same priority as other time-sensitive
                  tasks. Lower values make the system more responsive at the
                  cost of additional context switches; higher values slightly
                  delay alarm handling under load.

            config RT_ALARM_PRIORITY
                int "priority for alarm thread"
                default 10
                help
                  RT-Thread priority (smaller numbers are higher priority) of
                  the alarm management thread. Choose a priority above most
                  application threads if you require deterministic wakeups, or
                  below CPU-intensive tasks when alarm latency is less critical.

            config RT_ALARM_USING_LOCAL_TIME
                bool "Using local time for the alarm calculation"
                default n
                depends on RT_USING_ALARM
                help
                  Make the alarm service convert timestamps with `mktime()` so
                  alarms follow the configured local time zone instead of UTC.
                  Enable this when alarms must honor daylight saving or custom
                  offsets; otherwise keep it disabled to avoid the overhead of
                  repeatedly converting between UTC and local time.
        endif

        config RT_USING_SOFT_RTC
            bool "Using software simulation RTC device"
            default n
            help
              Build the tick-based software RTC implementation (`dev_soft_rtc`)
              for boards without dedicated RTC hardware. The driver keeps time
              by accumulating system ticks and stores values in RAM only, so it
              resets to the compile-time default after power loss. Enable it for
              simulations or low-cost MCUs that still need an `rtc` device node;
              disable it when real RTC registers are available to avoid two
              competing time sources.
    endif

config RT_RTC_DS1302
    bool "Dallas/Maxim DS1302"
    depends on RT_USING_DM
    depends on RT_USING_RTC
    depends on RT_USING_SPI
    default n

config RT_RTC_DS1307
    bool "Dallas/Maxim DS1307/37/38/39/40, ST M41T11"
    depends on RT_USING_DM
    depends on RT_USING_RTC
    depends on RT_USING_I2C
    default n

config RT_RTC_GOLDFISH
    bool "Goldfish Real Time Clock"
    depends on RT_USING_DM
    depends on RT_USING_RTC
    default n

config RT_RTC_HYM8563
    bool "Haoyu Microelectronics HYM8563"
    depends on RT_USING_DM
    depends on RT_USING_RTC
    depends on RT_USING_I2C
    default n

config RT_RTC_PCF8523
    bool "NXP PCF8523"
    depends on RT_USING_DM
    depends on RT_USING_RTC
    depends on RT_USING_I2C
    default n

config RT_RTC_PCF8563
    bool "Philips PCF8563/Epson RTC8564"
    depends on RT_USING_DM
    depends on RT_USING_RTC
    depends on RT_USING_I2C
    default n

config RT_RTC_PL031
    bool "ARM PL031"
    depends on RT_USING_DM
    depends on RT_USING_RTC
    default n

config RT_RTC_RX8010
    bool "Epson RX8010SJ"
    depends on RT_USING_DM
    depends on RT_USING_RTC
    depends on RT_USING_I2C
    default n

if RT_USING_DM && RT_USING_RTC
    osource "$(SOC_DM_RTC_DIR)/Kconfig"
endif