Can't enable GCLK Generators for samr30-xplained (using RIOT OS)

82 views Asked by At

In simple terms: I am trying to setup a timer/counter clocked by an external source. The device is SAMR30-Xplained Pro and RIOT is the OS.

In a bit more detail: I am trying to get a gclk generator (e.g 6) to connect to a timer/counter (e.g TC4), and hooking up the generator to a GCLK_IO (PA22) as clock source. Only the generator 0 is active and makes the timers count, but other generators aren't even starting, even though I try to enable them. Here is my code.

Would anyone know what is going on here? Is RIOT disabling them somehow?

1

There are 1 answers

0
user1273684 On

You shouldn't have to configure the GCLKs manually.

Setting .gclk_src in the timer_config struct in periph_conf.h should be enough. The GCLK is then enabled automatically by RIOT when you configure the timer.