====== ARM Timer/Counter ====== ===== Discussion on frequency measurements and frequency counts ===== {{https://www.pjrc.com/teensy/td_libs_FreqCount_vs_FreqMeasure.png?600}} Source: Paul Stoffregen, [[https://www.pjrc.com/teensy/td_libs_FreqMeasure.html#compare|FreqCount vs FreqMeasure]] Paul Stoffregen's libraries for Teensy and "standard" Arduinos (not M0): * FreqCount Library: * About: https://www.pjrc.com/teensy/td_libs_FreqCount.html * Github: https://github.com/PaulStoffregen/FreqCount * FreqMeasure Library: * About: https://www.pjrc.com/teensy/td_libs_FreqMeasure.html * Github: https://github.com/PaulStoffregen/FreqMeasure ===== ARM vs. AVR Timer ===== A good introduction on timer interrupts of AVR MCs is given by Amanda Ghassaei on Instructables: http://www.instructables.com/id/Arduino-Timer-Interrupts/ The configuration of timers in ARM cortex M processors such as SAMD21 is somewhat more complex. The links below may help to understand the timer/counter configurations. ===== Links ===== * Paul Stoffregen (Teensy, Freescale) * **FreqCount Library:** * About: https://www.pjrc.com/teensy/td_libs_FreqCount.html * Github: https://github.com/PaulStoffregen/FreqCount * **FreqMeasure Library:** * About: https://www.pjrc.com/teensy/td_libs_FreqMeasure.html * Github: https://github.com/PaulStoffregen/FreqMeasure * Max Bader (M0, zero): https://github.com/maxbader/arduino_tools * timer_m0_tc_counter * timer_m0_tc_interrupt * timer_m0_tcc_interrupt * Nonsintetic (M0, zero): https://gist.github.com/nonsintetic/ * ArduinoZeroTimer * Arduino Forum: [[https://forum.arduino.cc/index.php?topic=332275.0|Arduino ZERO Timer Interrupts]]