1 .. _module-pw_chrono_freertos:
6 ``pw_chrono_freertos`` is a collection of ``pw_chrono`` backends that are
7 implemented using FreeRTOS.
10 This module is under construction, not ready for use, and the documentation
15 The FreeRTOS based ``system_clock`` backend implements the
16 ``pw_chrono:system_clock`` facade by using ``xTaskGetTickCountFromISR()`` and
17 ``xTaskGetTickCount()`` based on the current context. Before the global
18 singleton SystemClock's SpinLock is constructed the raw result is returned,
19 after the overflows are managed in a thread and IRQ safe manner to produce a
20 signed 64 bit timestamp.
22 The ``SystemClock::now()`` must be used more than once per overflow of the
23 native FreeRTOS ``xTaskGetTickCount*()`` overflow. Note that this duration may
24 vary if ``portSUPPRESS_TICKS_AND_SLEEP()``, ``vTaskStepTick()``, and/or
25 ``xTaskCatchUpTicks()`` are used.
29 The GN build for ``pw_chrono_freertos`` has one target: ``system_clock``.
30 The ``system_clock`` target provides the
31 ``pw_chrono_backend/system_clock_config.h`` and ``pw_chrono_freertos/config.h``
32 headers and the backend for the ``pw_chrono:system_clock``.