MCUdude / MegaCoreX

An Arduino hardware package for ATmega4809, ATmega4808, ATmega3209, ATmega3208, ATmega1609, ATmega1608, ATmega809 and ATmega808
GNU Lesser General Public License v2.1
239 stars 47 forks source link

I suggest giving the timer usage in the documentation #165

Closed technoblogy closed 1 year ago

technoblogy commented 1 year ago

It would be good to have a sentence in the documentation stating which timers are used by default for Arduino functions; I believe it's TCB2 for millis() and delay(), but it would be good to have a statement to that effect.

SpenceKonde commented 1 year ago

Is someone spoiled by my essay-length documentation?

https://github.com/SpenceKonde/DxCore/blob/master/megaavr/extras/Ref_Timers.md (the timer doc is by far the longest, comes to 75kb of text. In total, the Ref_ docs, which are intended to be the authoritative ones, come to 570kb, give or take.

technoblogy commented 1 year ago

I'd settle for something less definitive than that!

cattledogGH commented 1 year ago

The Timer used for millis() is given in the variants files with pins_arduino.h.

I believe it's TCB2 for millis() and delay()

Depends on the processor/board. For the Nano Every and UnoWiFi using the 4809 its TCB3.

MCUdude commented 1 year ago

Resolved in 8dca08