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

101 Commits

Author SHA1 Message Date
Francisco Molina
c21c01b5b9 sys/ztimer: fix kconfig ZTIMER_SEC default 2021-12-14 18:44:48 +01:00
Francisco Molina
5e47fc7e22 cpu: do not auto-select ztimer_periph_rtt for sam0, fe310
The sam0 rtt busy loops for 180us every time an alarm is set or
the counter is read, this propagates and leads to timing errors
on ztimer_msec that are higher than > +-1msec.

The same goes for fe310.
2021-12-14 18:43:53 +01:00
Francisco Molina
dd03d8c362 sys/ztimer: ztimer_set return the now value 2021-12-13 11:21:23 +01:00
Leandro Lanzieri
1733953b49
sys/ztimer: fix backend selection 2021-12-10 09:57:05 +01:00
d959ce7eea
Merge pull request #16928 from kaspar030/ztimer64
sys/ztimer64: initial PR
2021-12-09 10:17:15 +01:00
Francisco Molina
b65ab31971 sys/ztimer/periodic: always set timer->last, no ztimer_now on last call 2021-12-07 19:42:45 +01:00
495a48af0f sys/ztimer: add ZTIMER_PERIPH_TIMER_OFFSET 2021-12-07 11:06:07 +01:00
Francisco
662aba4680
Merge pull request #17307 from leandrolanzieri/pr/sys/ztimer/kconfig/fix_compat_deps
sys/ztimer/kconfig: enable xtimer compat only with timer backend
2021-12-02 14:52:30 +01:00
b6cc07009f
Merge pull request #17284 from fjmolinas/pr_ztimer_no_periph_rtt
sys/ztimer: add 'ztimer_no_periph_rtt'
2021-12-02 11:02:24 +01:00
Leandro Lanzieri
004da59672
sys/ztimer/kconfig: enable xtimer compat only with timer backend
This also moves the selection of MODULE_ZTIMER_PERIPH_TIMER from
MODULE_ZTIMER_USEC to the visible symbol ZTIMER_USEC.
2021-12-02 09:38:06 +01:00
Francisco Molina
638373eec5 sys/ztimer: add ztimer_periph_rtt module conflict warning 2021-12-02 07:54:38 +01:00
Francisco Molina
7c3360e4d6 sys/ztimer: add 'ztimer_no_periph_rtt'
This is a temporary fix for Issue #17060. It allows to disable
auto inclusion of `ztimer_periph_rtt` in cases where another
module or application requires direct access.

Limitations:
- as ifeq are involved order of inclusion matters, therefore
  these modules should be included early in the build at application
  level and not in modules `Makefile.dep`
- this does not disallow direct inclusions of `ztimer_periph_rtt`,
  since this only disables auto inclusion of these modules

This is a temporary solution since this is already possible with
Kconfig, but not in make.
2021-12-02 07:54:38 +01:00
Francisco Molina
d0758b5a7e sys/ztimer: remove double ztimer indirection
To avoid confusions between `auto_init_ztimer` and `ztimer_auto_init`
rename `ztimer_auto_init` to `ztimer_init`.

This allows for similar handling as `saul_init_devs` and
`auto_init_devs`. Dependencies are therefore done against the USEMODULE
and not DEFAULT_MODULE or checking DISABLE_MODULE. For this, both
`ztimer_init` and `auto_init_ztimer` are added to DEFAULT_MODULE and
both need disabling if the user does not want that module in.

With this, the comment in Kconfig no longer applies.
2021-11-25 11:26:34 +01:00
4c03d10f7b
Merge pull request #17234 from fjmolinas/pr_cocci_ztimer_fixes
sys/ztimer/xtimer2ztimer.cocci: extend and fix api replacements
2021-11-19 15:18:07 +01:00
Francisco Molina
e6a79c8729 sys/ztimer/xtimer2ztimer.cocci: extend and fix api replacements 2021-11-18 18:27:23 +01:00
Karl Fessel
eb11e463df sys/ztimer: make internal head update static 2021-11-18 13:45:49 +01:00
Leandro Lanzieri
703e66b4c1
sys/ztimer/kconfig: change entry point 2021-11-09 15:32:34 +01:00
Leandro Lanzieri
3837286750
sys/{x,z}timer/Kconfig: fix compatibility modules 2021-11-09 15:32:33 +01:00
Francisco Molina
2e4dfa0aac sys/ztimer: don't default to rtc for ztimer_sec 2021-11-02 15:31:04 +01:00
Leandro Lanzieri
f64b166319
Merge pull request #16845 from MrKevinWeiss/pr/kconfig/supportstms
.murdock: Add nucleo boards to kconfig test
2021-11-01 09:55:22 +01:00
261a615439
ztimer: Use auto_init for manual init in bootloaders 2021-10-25 22:24:07 +02:00
MrKevinWeiss
9b6a63a951
drivers/kconfig: simplify shared rtt/rtc hardware in kconfig 2021-10-14 11:28:46 +02:00
MrKevinWeiss
c7820cf7e5
*/rtt|rtc: Fix Kconfig modeling 2021-10-14 11:28:44 +02:00
Leandro Lanzieri
34259e1e29
sys/ztimer: add dependencies for ztimer_sec 2021-10-01 11:26:12 +02:00
José Alamos
1ee57f80a0
Merge pull request #15030 from jia200x/pr/lora/remove_xtimer
drivers/sx127x: remove ZTIMER_USEC dependency
2021-09-27 11:41:22 +02:00
MrKevinWeiss
214b19551d
sys/ztimer: Fix stm32f1 naming for kconfig 2021-07-02 15:11:11 +02:00
Jose Alamos
94d46e756e
cpu/fe310: fix RTT frequency 2021-07-02 14:53:22 +02:00
Francisco
bc5810ea33
Merge pull request #16573 from kfessel/p-convert-ztimer-require-no-pm
sys/ztimer: convert clock do not require pm
2021-06-28 10:03:27 +02:00
Karl Fessel
a6a53c98f7 sys/ztimer: convert clock do not require pm
avoid blocking and unblocking of power_mode 0 for convert clocks
2021-06-21 13:56:03 +02:00
Francisco Molina
beee6fdffb
sys/ztimer: use highest frequency for nrf51 as well 2021-06-18 14:14:09 +02:00
Francisco Molina
c80390f28b
ztimer: pull ztimer_periph_rtt for ZTIMER_MSEC if available 2021-06-16 11:18:25 +02:00
88b509e56d ztimer: correctly unset timer->next (fix ztimer_is_set())
ztimer's machinery depends on figuring out if a timer is currently set
or not. It does that using _is_set(), which is also exposed as
ztimer_is_set().
Now when a timer expired and got taken of the timer queue using
_now_next(), the `next` pointer wasn't unset. This caused _is_set() to
wrongly return `true` for that timer.
Internally in ztimer, this didn't cause breakage, just an unnecessary
iteration of the timer queue by _delete_timer_from_list().
But this also broke the public ztimer_is_set().

This commit fixes the issue by correctly NULLing the timer's `next`
pointer when the timer triggers.
2021-04-22 11:06:04 +02:00
Karl Fessel
951fa14d70 sys/ztimer: rename required_pm_mode to block_pm_mode 2021-04-06 16:57:53 +02:00
Francisco
9d1d2f9e21
Merge pull request #16172 from kfessel/p-zimer-sec
sys/ztimer: add ZTIMER_SEC, improve auto_init
2021-04-02 08:32:38 +02:00
Karl Fessel
3f66735bde ztimer/periph_rtc: intialize struct tm to avoid TZ and IDST problems
{ .elem = 0 }  initializes the complete struct to 0
{} is not ISO C conform
2021-04-01 18:19:15 +02:00
Karl Fessel
9e7f1d0097 sys/ztimer: add ZTIMER_SEC to Kconfig 2021-04-01 18:19:15 +02:00
Karl Fessel
0b5709a853 ztimer/periph_rtc: count months from 0
contrary to the western civilised world struct tm requires
us to count months from 0
2021-04-01 18:19:15 +02:00
Karl Fessel
aa770fdd8c ztimer/auto_init: restructure for flexibitily, pm for ZTIMER_SEC
MSEC and SEC are now usable on TIMER(0) without having USEC
pm is configured by used hardware
    OLD configuration values are translated for backward compatibility
prefer rtt for ZTIMER_SEC

avoid doing partial ztimer setup if auto_init_ztimer is disabled

before this patch some const pointers might have been definend to values
that a user who disables auto_init for ztimer does not like.
2021-04-01 18:19:01 +02:00
Jnae
b1aaa974bd sys/ztimer: add periph_ptp backend 2021-03-28 15:50:19 +02:00
Marian Buschsieweke
da76ca68db sys/ztimer: add ZTIMER_SEC
wire up ZTIMER_SEC to the existing RTC backend, or RTT backend, or periph_timer
backend (in this order of preference).

Update sys/ztimer/auto_init.c

Co-authored-by: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de>
2021-03-08 15:11:53 +01:00
Leandro Lanzieri
6a0240d04b
sys/ztimer/kconfig: add defaults for backends 2021-03-04 10:48:27 +01:00
Martine Lenders
6da60c933d
Merge pull request #15802 from miri64/treewide/cleanup/cppcheck-whitelisted
treewide: re-uncrustify whitelisted files
2021-02-03 07:59:27 +01:00
Martine Lenders
7e3846b6a4
ztimer: apply uncrustify patches 2021-02-02 22:21:15 +01:00
Vincent Dupont
751a366931 ztimer: fix uncrustify issue in util.c 2021-02-02 10:52:10 +01:00
Vincent Dupont
fb4d2e509a ztimer: add ztimer_rmutex_lock_timeout()
Similar to xtimer_rmutex_lock_timeout()
2021-02-02 10:51:50 +01:00
Francisco
5c5ec632a5
Merge pull request #15716 from leandrolanzieri/pr/kconfig/ztimer
sys/ztimer: add modules to Kconfig
2021-01-20 15:31:20 +01:00
Hauke Petersen
f5de257d58 ztimer: expose ztimer_is_set() to public API 2021-01-18 17:50:50 +01:00
Leandro Lanzieri
6625a15bf6
sys/ztimer: add modules to Kconfig 2021-01-18 14:14:13 +01:00
Marian Buschsieweke
d48fac278b
sys/ztimer: drop unused internal typedef 2020-12-08 22:54:39 +01:00
Marian Buschsieweke
71a0c53df2
sys/ztimer: Add ztimer_mutex_lock_timeout() 2020-12-08 22:54:39 +01:00