1.. _module-pw_chrono_embos: 2 3--------------- 4pw_chrono_embos 5--------------- 6``pw_chrono_embos`` is a collection of ``pw_chrono`` backends that are 7implemented using embOS v4 for 32bit targets. 8 9.. warning:: 10 This module is under construction, not ready for use, and the documentation 11 is incomplete. 12 13SystemClock backend 14------------------- 15The embOS based ``system_clock`` backend implements the 16``pw_chrono:system_clock`` facade by using ``OS_GetTime32()``. An 17InterruptSpinLock is used to manage overflows in a thread and interrupt safe 18manner to produce a signed 64 bit timestamp. Note that this does NOT use 19``OS_GetTime_us64()`` which is not always available, this could be considered 20for a future alternative backend for the SystemClock. 21 22The ``SystemClock::now()`` must be used more than once per overflow of the 23native embOS ``OS_GetTime32()`` overflow. Note that this duration may 24vary if ``OS_SUPPORT_TICKLESS`` is used. 25 26Build targets 27------------- 28The GN build for ``pw_chrono_embos`` has one target: ``system_clock``. 29The ``system_clock`` target provides the 30``pw_chrono_backend/system_clock_config.h`` and ``pw_chrono_embos/config.h`` 31headers and the backend for the ``pw_chrono:system_clock``. 32