1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

13 Commits

Author SHA1 Message Date
Karl Fessel
0cfdd3d679 test/periph_rtc: reset struct tm time between tests 2023-03-03 15:47:09 +01:00
Benjamin Valentin
c8d94e89c9 tests/periph_rtc: test for periph_rtc_mem 2021-09-03 11:43:43 +02:00
Benjamin Valentin
84bb42ce1f tests/periph_rtc: add rtc_get_time_ms() to test 2021-05-03 00:09:18 +02:00
Daniel Lockau
e7054b4f53 tests/periph_rtc: test clear alarm 2020-12-15 12:52:35 +01:00
Benjamin Valentin
d90d09573b tests/periph_rtc: delay RTC init
Just like `tests/periph_rtt`, delay the RTC init so that if init gets stuck
it doesn't get stuck in early boot but inside the test.
This makes debugging easier.
2020-07-31 22:06:18 +02:00
Benjamin Valentin
6581d43337 tests/periph_rtc: don't set time in the past 2020-03-03 11:01:02 +01:00
Gunar Schorcht
46dbd867f2 tests/periph_rtc: fix system locks in ISR
`tests/periph` calls the functions `rtc_get_alarm` and `rtc_set_alarm` from an ISR. Depending on the implementation of `periph_rtc`, however, these functions use `newlib` functions such as `localtime` and `mktime`, which in turn call the `newlib` lock function `__tz_lock`. This can lead to a system lock if the `newlib`  with real lock functionality is used instead of the `newlib_nano`.
2020-02-02 15:04:22 +01:00
Benjamin Valentin
b1724a7d1b periph/rtc: normalize struct tm before usage
A naive implementation may set a RTC alarm in 30s by calling

	struct tm now;
	rtc_get_time(&now);
	now.tm_sec += 30;
	rtc_set_alarm(&now, _cb, NULL);

This works for RTC implementations that use a RTT internally and call
mktime() to convert the struct tm to a unix timestamp, as mktime() will
normalize the struct in the process.

Call rtc_tm_normalize() when the RTC uses separate registers for time / date
components to ensure it is normalized.

This also modifies tests/periph_rtc to exercise this case.
2019-09-12 11:32:31 +02:00
Vincent Dupont
e2c358ee48 tests/{periph_rtc,pkg_fatfs}: remove call to rtc_init 2017-11-13 18:43:50 +01:00
Hauke Petersen
55de35345c tests/periph_rtc: repaired and cleaned up RTC test 2017-08-23 15:39:16 +02:00
MichelRottleuthner
0a9383228e stm32_common/periph/rtc: fix wrong read order of rtc regs, add wait for calender sync to rtc_set_time 2017-08-07 16:35:56 +02:00
c6c7e9e981 tests: periph_rtc: switch to xtimer 2015-09-16 10:58:54 +02:00
Lari Lehtomäki
1ecaadab4e cpu/stm32f0: RTC implementation with external clock
tests: Tests for RTC clock
2015-08-20 13:09:43 +03:00