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: docs/headers/sys/timers.rst
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,14 @@ sys/timers.h
9
9
10
10
This header includes defines for the CE's 3 hardware timers.
11
11
It is discouraged from directly modifying the timers themseleves, and instead use the standard C `clock()` fuction.
12
-
These functions provide direct maniplution of the hardware timers.
13
-
Keep in mind that using them may cause the `clock()` and related functions to not work correctly.
14
-
This header also includes functions such as `sleep()` and `delay()` which are based around `clock()`'s functionality and are always safe to use.
12
+
This is because the toolchain uses the timers in the following way:
13
+
14
+
* Timer 1 is used for `clock()` and related functions like `sleep()`.
15
+
* Timer 2 is used by the :ref:`usbdrvce library <usbdrvce_h>`.
16
+
* Timer 3 is used by the TI-OS USB stack and shouldn't be touched in most every case.
17
+
18
+
Directly manipulating the hardware timers may cause the above functions and/or libraries to not work correctly.
19
+
However, for example if you aren't using usbdrvce it is possible to use Timer 2 in your application.
15
20
16
21
There are two possible timing ("clock") sources: a 32768 Hz crystal with similar accuracy to the clock found in any smartphone or wristwatch, and the CPU's main 48 MHz clock with likely much inferior accuracy.
0 commit comments