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: doc/nrf-bm/libraries/timer.rst
+7-12Lines changed: 7 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,18 @@
1
1
.. _lib_bm_timer:
2
2
3
-
Timer library
4
-
#############
3
+
Bare Metal Timer library
4
+
########################
5
5
6
6
.. contents::
7
7
:local:
8
8
:depth: 2
9
9
10
-
The timer library allows the application to create multiple timer instances.
10
+
The BM Timer is a library that is wrapped on top of the Zephyr Timers functionality that is implemented using the GRTC peripheral.
11
11
12
-
Functions such as starting and stopping timers, checking for timeouts, and invoking user-defined timeout handlers are all managed within the GRTC interrupt handler.
12
+
The BM Timer has a resolution of 1 µs and is able to run in all power modes.
13
+
This gives the capability of waking up the system after a period or at specific intervals, independent of power modes.
14
+
The BM timer allows the application to create multiple timer instances each with dedicated user defined timeout handlers.
15
+
The timers can be individually started and stopped.
13
16
14
17
Configuration
15
18
*************
@@ -41,14 +44,6 @@ The library provides macros to convert standard time units to ticks:
41
44
* :c:macro:`BM_TIMER_US_TO_TICKS` - Converts microseconds to ticks.
42
45
* :c:macro:`BM_TIMER_MS_TO_TICKS` - Converts milliseconds to ticks.
43
46
44
-
The timer library is using the GRTC peripheral, available in all power modes including ``System OFF``.
45
-
The GRTC peripheral has a resolution of 1 microsecond.
46
-
47
-
.. note::
48
-
49
-
The timer accuracy is reduced in low power mode.
50
-
The low frequency clock source, running 32.768 kHz, provides a clock tick approximately every 30.5 microseconds.
51
-
52
47
To stop a timer, call the :c:func:`bm_timer_stop` function.
0 commit comments