Thanks Tom. Can you explain why the M0 timers are hard to configure? Is it just too many features/register settings, or are there bugs/quirks?
I will try to say this in a civilized way
ARM SOCs, in general, have a bunch of different peripherals that can be configured in a variety of ways. Some chips provide a very extensive interconnect matrix that literally lets you tie any peripheral to any set of IO pins, or, better yet, to internal 'Event' busses that allow setting up hardware connections between peripherals so that you could, for example, set a counter to count incoming pulses and, at a trip point, trigger the AD converter, which, when done, will in turn signal the processor and wake it up (as it can sleep the entire time all this is going on in the background).
The SAMD21 has this ability in a less universal way, ie, there are only a subset of interconnects that are implemented on the chip. Consequently, the interconnect choices are governed by what other choices are made on the chip. If you're using one set of choices, a whole slew of options disappear. Now, this might be reasonable to make it more HW efficient, however, the combination matrix is so complex, to date (and to my knowledge), no one has produced a set of library functions that make it trivial to say, set this timer/counter in count mode and take the clock input from GPIO5 and the enable from the overflow of Timer 1. To implement this you have to declare a set of macros that, IMO, make the code unreadable and extremely difficult to debug.
By contrast, Nordic Semiconductor chips have a consistent syntax for virtually all of their internal interconnects that allows you to learn ONE syntax and then apply this knowledge to any other peripheral you want to use.
For the most standard configurations, the Arduino library authors have taken care of this problem for you. However, good luck if you want to deviate from the 'normal' configuration.
Tom