[riot-devel] EFM32 timers, PWM and xtimer

chrysn chrysn at fsfe.org
Mon Nov 12 17:40:33 CET 2018


Hello RIOT developers,

working with the EFM32 port trying to use some PWM pins, I found that of
the four TIMER peripherals (each of which is tied to particular sets of
PWM pins it can drive), two adjacent[1] ones are in use
for a combined RIOT timer peripheral that them forms also the
XTIMER_DEV. This means that two timers (1 and 2 of 0, 1, 2 and 3) are
practically unusable for any PWM.

Before I go head-first into hacking something together with a timer
implementation based on the RTC or the systick peripheral, was there a
particular rationale behind making this the default timer on EFM32?

AFAICS, the design does make sense when it comes to creating arbitrary
timers (where the lower timer gets its fine-grained top value output a
precise frequency), but that isn't really required when it comes to
providing a timer for XTIMER which has its own XTIMER_HZ value which
"just" needs to set to an adaequate value. How is the trade-off between
having PWM devices vs. having a fine-grained-fixed-frequency capable
timer usually handled?

Thanks
chrysn

[1]:  That's a limitation of the chips, where TIMEROUF only works
between adjacent timers.

-- 
To use raw power is to make yourself infinitely vulnerable to greater powers.
  -- Bene Gesserit axiom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.riot-os.org/pipermail/devel/attachments/20181112/680db4be/attachment.sig>


More information about the devel mailing list