I have a SAM D21 Xplained board that I am using to learn about the SAM D21 MCU. I am more familiar with AVR devices. This one seems to be quite complex and sparsely documented (compared to AVR).
What I would like to do is use an external interrupt to cause one of the timers (counter) to increment. I would like to use another timer to periodically record (print to usart, save in nvm, etc) the count of the other timer and reset it to zero. Essentially I am building a frequency meter. I have tried using ASF3 via AS7, and was able to get the periodic timer and the external interrupt working, but I haven't been able to use the event system to connect the interrupt and timer/counter. I have done the same using Atmel START.
What do you recommend as the best way to do this (e.g. writing registers directly, asf3, asf4/START)?
Is Atmel START the first place I should be looking for hardware drivers?
Does ASF3/4 include the functionality to do this or will I have to resort to low level code regardless?
I have seen examples linking an external interrupt to a timer capture, but I have not seen one using the external interrupt to cause the timer to increment. Does an example like this exist and can someone point me to it?
I suppose I can always simply use the external interrupt to manually increment a counter variable and then record that value in my periodic interrupt, but it seems like there is a way to do this in hardware and I would like to be able to experiment with both methods.