Skip to content

ztimer with two instances of ztimer_periph_timer #17611

@jue89

Description

@jue89

Description

I'm using ztimer on the efm32 family. This family has two different types of periph_timer: One which makes use of the EFM32 TIMER peripheral and one that utilizes the EFM32 LETIMER peripheral. The latter one may be clocked by a low-frequency crystal and stays active during lower power modes.

I'd like to use a LETIMER for the ZTIMER_MSEC and one TIMER for the ZTIMER_USEC. This combination isn't supported by ztimer_init. (I have reasons for not using periph_rtt: it conflicts with the internal radio in my case.) I see two different options for this:

  1. Make ztimer_init() weak and provide an own ztimer_init() for the EFM32 family.
  2. Somehow bring this combination into the current ztimer_init()

I'd say the first option is the better one. The current ztimer_init() implementation is already very complex. I'd say introducing more complexity for this corner case isn't worth it.

What do you think?

Useful links

Metadata

Metadata

Assignees

Labels

Area: timersArea: timer subsystemsType: questionThe issue poses a question regarding usage of RIOT

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions