/Zephyr-Core-3.7.0/drivers/rtc/ |
D | Kconfig | 4 menuconfig RTC config 5 bool "Real-Time Clock (RTC) drivers" 7 Enable RTC driver configuration. 9 if RTC 11 module = RTC 12 module-str = rtc 16 int "RTC init priority" 19 RTC device driver initialization priority. 22 bool "RTC driver alarm support" 24 This is an option which enables driver support for RTC alarms. [all …]
|
D | rtc_ll_stm32.c | 17 #include <zephyr/drivers/rtc.h> 50 /* RTC start time: 1st, Jan, 2000 */ 87 /* Zephyr mask supported by RTC device, values from RTC_ALARM_TIME_MASK */ 102 * After system reset, the RTC registers are protected against parasitic write access by the 104 * Hence, DBP bit must be set in order to enable RTC registers write access. 145 uint32_t hour_format = LL_RTC_GetHourFormat(RTC); in rtc_stm32_configure() 146 uint32_t sync_prescaler = LL_RTC_GetSynchPrescaler(RTC); in rtc_stm32_configure() 147 uint32_t async_prescaler = LL_RTC_GetAsynchPrescaler(RTC); in rtc_stm32_configure() 149 LL_RTC_DisableWriteProtection(RTC); in rtc_stm32_configure() 151 /* configuration process requires to stop the RTC counter so do it in rtc_stm32_configure() [all …]
|
D | Kconfig.numaker | 1 # NUMAKER RTC Driver configuration options 7 bool "Nuvoton NuMaker MCU RTC driver" 12 This option enables the RTC driver for Nuvoton NuMaker family of 14 Say y if you wish to enable NuMaker RTC.
|
D | rtc_smartbond.c | 13 #include <zephyr/drivers/rtc.h> 29 #define RTC_ALARMS_COUNT DT_PROP(DT_NODELABEL(rtc), alarms_count) 115 /* Exercise which events asserted the RTC IRQ line. Register is cleared upon read. */ in smartbond_rtc_isr() 116 uint32_t rtc_event_flags_reg = RTC->RTC_EVENT_FLAGS_REG; in smartbond_rtc_isr() 118 uint32_t rtc_interrupt_mask_reg = RTC->RTC_INTERRUPT_MASK_REG; in smartbond_rtc_isr() 147 RTC->RTC_CONTROL_REG = 0; in rtc_smartbond_set_status() 149 RTC->RTC_CONTROL_REG = (RTC_RTC_CONTROL_REG_RTC_CAL_DISABLE_Msk | in rtc_smartbond_set_status() 187 uint32_t rtc_time_reg = RTC->RTC_TIME_REG; in bcd_to_rtc_time() 198 uint32_t rtc_calendar_reg = RTC->RTC_CALENDAR_REG; in bcd_to_rtc_calendar() 221 LOG_ERR("RTC time exceeds HW capabilities"); in rtc_smartbond_set_time() [all …]
|
/Zephyr-Core-3.7.0/tests/drivers/rtc/shell/src/ |
D | main.c | 9 #include <zephyr/drivers/rtc.h> 10 #include <zephyr/drivers/rtc/rtc_fake.h> 30 struct rtc_time rtc; member 35 static int rtc_fake_get_time_mock(const struct device *dev, struct rtc_time *rtc) in rtc_fake_get_time_mock() argument 39 *rtc = get_time_mock.rtc; in rtc_fake_get_time_mock() 43 static int rtc_fake_set_time_mock(const struct device *dev, const struct rtc_time *rtc) in rtc_fake_set_time_mock() argument 47 set_time_mock.rtc = *rtc; in rtc_fake_set_time_mock() 61 get_time_mock.rtc.tm_year = 2023 - 1900; /* rtc_time year offset */ in configure_get_time_mock() 62 get_time_mock.rtc.tm_mon = 12 - 1; /* rtc_time month offset */ in configure_get_time_mock() 63 get_time_mock.rtc.tm_mday = 24; in configure_get_time_mock() [all …]
|
/Zephyr-Core-3.7.0/drivers/counter/ |
D | counter_ll_stm32_rtc.c | 8 * Source file for the STM32 RTC driver 108 static inline ErrorStatus ll_func_init_alarm(RTC_TypeDef *rtc, uint32_t format, in ll_func_init_alarm() argument 112 return LL_RTC_ALARM_Init(rtc, format, alarmStruct); in ll_func_init_alarm() 114 return LL_RTC_ALMA_Init(rtc, format, alarmStruct); in ll_func_init_alarm() 118 static inline void ll_func_clear_alarm_flag(RTC_TypeDef *rtc) in ll_func_clear_alarm_flag() argument 121 LL_RTC_ClearFlag_ALR(rtc); in ll_func_clear_alarm_flag() 123 LL_RTC_ClearFlag_ALRA(rtc); in ll_func_clear_alarm_flag() 127 static inline uint32_t ll_func_is_active_alarm(RTC_TypeDef *rtc) in ll_func_is_active_alarm() argument 130 return LL_RTC_IsActiveFlag_ALR(rtc); in ll_func_is_active_alarm() 132 return LL_RTC_IsActiveFlag_ALRA(rtc); in ll_func_is_active_alarm() [all …]
|
D | counter_nrfx_rtc.c | 73 NRF_RTC_Type *rtc; member 87 nrfy_rtc_task_trigger(config->rtc, NRF_RTC_TASK_START); in start() 96 nrfy_rtc_task_trigger(config->rtc, NRF_RTC_TASK_STOP); in stop() 105 return nrfy_rtc_counter_get(config->rtc); in read() 167 NRFY_IRQ_PENDING_SET(NRFX_IRQ_NUMBER_GET(config->rtc)); in set_cc_int_pending() 172 * RTC will not generate event if CC value equals COUNTER+1. If such CC is 190 nrfy_rtc_cc_set(config->rtc, chan, val); in handle_next_tick_case() 192 if (nrfy_rtc_counter_get(config->rtc) != now) { in handle_next_tick_case() 195 nrfy_rtc_int_enable(config->rtc, NRF_RTC_CHANNEL_INT_MASK(chan)); in handle_next_tick_case() 207 * - RTC registers are clocked with LF clock (32kHz) and sampled between two [all …]
|
D | Kconfig.mcux_lpc_rtc | 5 bool "MCUX LPC RTC driver" 10 Enable the LPC rtc driver. 13 bool "MCUX LPC RTC 1Hz counter driver" 20 bool "MCUX LPC RTC High Resolution counter driver" 24 Enable support for LPC rtc high resolution counter.
|
D | Kconfig.stm32_rtc | 1 # STM32 Cube LL RTC 7 bool "STM32 Counter RTC driver" 8 default y if !RTC 15 Build RTC driver for STM32 SoCs. 21 bool "Save rtc time value between resets" 31 of the counter. The frequency of the time is RTC Source Clock divided
|
/Zephyr-Core-3.7.0/doc/hardware/peripherals/ |
D | rtc.rst | 3 Real-Time Clock (RTC) 19 * - RTC 22 An RTC is a low power device which tracks time using broken-down time. 38 between broken-down time and the unix timestamp within the RTC 63 RTC device driver test suite 66 The test suite validates the behavior of the RTC device driver. It 68 alias ``rtc`` to designate the RTC device to test. 73 * RTC Time incrementing correctly. 99 :zephyr-app: tests/drivers/rtc/rtc_api 102 To build the test with additional RTC features enabled, use menuconfig [all …]
|
/Zephyr-Core-3.7.0/dts/bindings/rtc/ |
D | st,stm32-rtc.yaml | 5 description: STM32 RTC 7 compatible: "st,stm32-rtc" 10 - rtc.yaml 11 - rtc-device.yaml 27 Number of alarms supported by STM32 RTC device. 28 Most of STM32 MCU series have 2 RTC alarms, A & B. 35 line connected to the RTC Alarm event. 36 Not required, since RTC Alarm interrupt could be routed directly to Nested
|
/Zephyr-Core-3.7.0/tests/subsys/mgmt/mcumgr/os_mgmt_datetime/boards/ |
D | qemu_arc_qemu_arc_hs6x.overlay | 7 rtc = &rtc; 10 rtc: rtc { 12 compatible = "zephyr,rtc-emul";
|
D | qemu_leon3.overlay | 7 rtc = &rtc; 10 rtc: rtc { 12 compatible = "zephyr,rtc-emul";
|
D | qemu_cortex_m0.overlay | 7 rtc = &rtc; 10 rtc: rtc { 12 compatible = "zephyr,rtc-emul";
|
D | qemu_malta.overlay | 7 rtc = &rtc; 10 rtc: rtc { 12 compatible = "zephyr,rtc-emul";
|
D | qemu_riscv64.overlay | 7 rtc = &rtc; 10 rtc: rtc { 12 compatible = "zephyr,rtc-emul";
|
D | qemu_riscv64_qemu_virt_riscv64_smp.overlay | 7 rtc = &rtc; 10 rtc: rtc { 12 compatible = "zephyr,rtc-emul";
|
D | native_posix.overlay | 7 rtc = &rtc; 10 rtc: rtc { 12 compatible = "zephyr,rtc-emul";
|
/Zephyr-Core-3.7.0/soc/nordic/nrf53/ |
D | sync_rtc.c | 17 * small and rtc synchronization process might not handle events on time. 31 uint8_t rtc; member 37 /* Algorithm for establishing RTC offset on the network side. 40 * APP starts first thus its RTC is ahead. Only network will need to adjust its 44 * using just IPC, PPI and RTC. 47 * APP: setup PPI connection from IPC_RECEIVE to RTC CAPTURE, enable interrupt 49 * NET: setup RTC CC for arbitrary offset from now, setup PPI from RTC_COMPARE to IPC_SEND 58 * NET: setup PPI from IPC_RECEIVE to RTC CAPTURE 60 * When NET RTC captures IPC event it takes CC value and knowing CC value previously 62 * to calculate exact offset between RTC counters. [all …]
|
/Zephyr-Core-3.7.0/tests/drivers/rtc/rtc_api/src/ |
D | test_alarm_callback.c | 10 #include <zephyr/drivers/rtc.h> 16 static const struct device *rtc = DEVICE_DT_GET(DT_ALIAS(rtc)); variable 17 static const uint16_t alarms_count = DT_PROP(DT_ALIAS(rtc), alarms_count); 74 ret = rtc_alarm_set_callback(rtc, i, NULL, NULL); in ZTEST() 85 ret = rtc_alarm_set_time(rtc, i, test_alarm_time_mask_set, &test_alarm_time_set); in ZTEST() 89 /* Set RTC time */ in ZTEST() 90 ret = rtc_set_time(rtc, &test_rtc_time_set); in ZTEST() 95 ret = rtc_alarm_is_pending(rtc, i); in ZTEST() 102 ret = rtc_alarm_set_callback(rtc, i, in ZTEST() 106 ret = rtc_alarm_set_callback(rtc, i, in ZTEST() [all …]
|
D | test_alarm.c | 10 #include <zephyr/drivers/rtc.h> 17 static const struct device *rtc = DEVICE_DT_GET(DT_ALIAS(rtc)); variable 18 static const uint16_t alarms_count = DT_PROP(DT_ALIAS(rtc), alarms_count); 78 ret = rtc_alarm_set_time(rtc, i, 0, NULL); in ZTEST() 85 ret = rtc_alarm_set_callback(rtc, i, NULL, NULL); in ZTEST() 93 ret = rtc_alarm_get_supported_fields(rtc, i, &alarm_time_mask_supported); in ZTEST() 99 ret = rtc_alarm_set_time(rtc, i, test_alarm_time_masks[j], in ZTEST() 103 "%s: RTC should reject invalid alarm %d time in field %zu.", in ZTEST() 104 rtc->name, i, j); in ZTEST() 111 ret = rtc_alarm_get_supported_fields(rtc, i, &alarm_time_mask_supported); in ZTEST() [all …]
|
/Zephyr-Core-3.7.0/tests/drivers/rtc/shell/ |
D | testcase.yaml | 2 drivers.rtc.shell: 8 - rtc 10 filter: dt_alias_exists("rtc") 11 depends_on: rtc
|
/Zephyr-Core-3.7.0/include/zephyr/drivers/ |
D | rtc.h | 9 * @file drivers/rtc.h 17 * @brief RTC Interface 18 * @defgroup rtc_interface RTC Interface 35 * @name RTC Alarm Time Mask 76 * @brief RTC update event callback 85 * @brief RTC alarm triggered callback 101 * @brief API for setting RTC time 107 * @brief API for getting RTC time 113 * @brief API for getting the supported fields of the RTC alarm time 120 * @brief API for setting RTC alarm time [all …]
|
/Zephyr-Core-3.7.0/samples/boards/numaker/system_off/src/ |
D | main.c | 10 #include <zephyr/drivers/rtc.h> 18 static const struct device *rtc = DEVICE_DT_GET(DT_ALIAS(rtc)); variable 28 /* Initialize RTC time to set */ in set_alarm_10s() 36 /* Set RTC time */ in set_alarm_10s() 37 ret = rtc_set_time(rtc, &time_set); in set_alarm_10s() 43 ret = rtc_alarm_set_time(rtc, 0, alarm_time_mask_set, &alarm_time_set); in set_alarm_10s() 51 const struct device *dev = DEVICE_DT_GET(DT_NODELABEL(rtc)); in main()
|
/Zephyr-Core-3.7.0/tests/drivers/rtc/rtc_api/ |
D | testcase.yaml | 5 drivers.rtc.rtc_api: 8 - rtc 10 filter: dt_alias_exists("rtc") 11 depends_on: rtc
|