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

17 Commits

Author SHA1 Message Date
Leandro Lanzieri
d2ca66e476
tests: add common Kconfig configuration for sync 2021-01-20 17:36:14 +01:00
Daniel Lockau
e7054b4f53 tests/periph_rtc: test clear alarm 2020-12-15 12:52:35 +01:00
Leandro Lanzieri
59dee592cd
tests/periph_*: add Kconfig configuration files 2020-11-06 15:58:00 +01:00
Benjamin Valentin
bdc43c245c cpu/native: RTC: implement rtc_set_alarm()
Use xtimer to simulate an RTC timer.
This allows to simulate software that makes use of `rtc_set_alarm()`
on native.
2020-08-16 23:28:30 +02: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
a1546375da
tests/periph_rtc: add automatic python test script 2019-01-18 14:42:58 +01:00
939774105f
tests/periph_rtc: fix alarm period in README
The default period value the application code is set to 2s
2019-01-18 09:17:30 +01:00
fc2eff9fba tests: remove redundant APPLICATION defines 2017-12-01 11:03:39 +01: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
smlng
52fadaf23a tests: remove redundant board and quiet statements 2017-01-20 19:36:04 +01: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