Open WestfW opened 4 years ago
kk - pleaes submit a PR, since its a comment we will be able to merge it easily!
OK; done. I'm slightly worried by the fact that it doesn't say anywhere in the TimerZero code that it's running the timers at 48MHz, although uses seem to assume that (ie https://github.com/adafruit/Adafruit_LvGL_Glue/blob/master/Adafruit_LvGL_Glue.cpp#L370 )
This is cosmetic... The code that sets the GCLK for the timer has a comment that is incorrect (copied from analogWrite() code?) It says "use clock generator 0" when it's quite clearly setting GCLK1...
https://github.com/adafruit/Adafruit_ZeroTimer/blob/master/Adafruit_ZeroTimer.cpp#L140
On SAMD51, GCLK0 is 120MHz, and GCLK1 is 48MHz, so using CLK1 makes the SAMD51 and SAMD21 "compatible."