You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/uTimerLib.cpp
+54-49Lines changed: 54 additions & 49 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
* STM32: Timer3 (3rd timer)
7
7
* SAM (Due): TC3 (Timer1, channel 0)
8
8
* ESP8266: OS Timer, one slof of seven available (Software timer provided by Arduino because ESP8266 has only two hardware timers and one is needed by it normal operation)
9
-
* SAMD21: Timer 3 (TCC2. Used because there're 3 a 5 timer versions). See http://ww1.microchip.com/downloads/en/DeviceDoc/40001882A.pdf
9
+
* SAMD21: Timer 4, CC0 (TC3). See http://ww1.microchip.com/downloads/en/DeviceDoc/40001882A.pdf
10
10
* SAMD51: Timer 2 (TC1), 16 bits mode (See http://ww1.microchip.com/downloads/en/DeviceDoc/60001507C.pdf
11
11
*
12
12
* @copyright Naguissa
@@ -300,42 +300,39 @@ void uTimerLib::_attachInterrupt_us(unsigned long int us) {
300
300
while (GCLK->STATUS.bit.SYNCBUSY == 1); // sync
301
301
302
302
// Disable TC
303
-
TCC2->CTRLA.reg &= ~TC_CTRLA_ENABLE;
304
-
while (GCLK->STATUS.bit.SYNCBUSY == 1); // sync
303
+
_TC->CTRLA.reg &= ~TC_CTRLA_ENABLE;
304
+
while (_TC->STATUS.bit.SYNCBUSY == 1); // sync
305
305
306
306
// Set Timer counter Mode to 16 bits + Set TC as normal Normal Frq + Prescaler: GCLK_TC/16
Copy file name to clipboardExpand all lines: src/uTimerLib.h
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
* STM32: Timer3 (3rd timer)
7
7
* SAM (Due): TC3 (Timer1, channel 0)
8
8
* ESP8266: OS Timer, one slof of seven available (Software timer provided by Arduino because ESP8266 has only two hardware timers and one is needed by it normal operation)
9
-
* SAMD21: Timer 3 (TCC2. Used because there're 3 a 5 timer versions). See http://ww1.microchip.com/downloads/en/DeviceDoc/40001882A.pdf
9
+
* SAMD21: Timer 4, CC0 (TC3). See http://ww1.microchip.com/downloads/en/DeviceDoc/40001882A.pdf
10
10
* SAMD51: Timer 2 (TC1), 16 bits mode (See http://ww1.microchip.com/downloads/en/DeviceDoc/60001507C.pdf
11
11
*
12
12
* @copyright Naguissa
@@ -54,6 +54,7 @@
54
54
55
55
#ifdef _SAMD21_
56
56
#pragma message "SAMD21 support is still experimental"
0 commit comments