We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f85eda commit 8162468Copy full SHA for 8162468
docs/rp2/quickref.rst
@@ -135,6 +135,12 @@ Use the :mod:`machine.Timer` class::
135
tim = Timer(period=5000, mode=Timer.ONE_SHOT, callback=lambda t:print(1))
136
tim.init(period=2000, mode=Timer.PERIODIC, callback=lambda t:print(2))
137
138
+By default, timer callbacks run as soft IRQs so they can allocate but
139
+are prone to GC jitter and delays. Pass ``hard=True`` to the ``Timer()``
140
+constructor or ``init()`` method to run the callback in hard-IRQ context
141
+instead. This reduces delay and jitter, but see :ref:`isr_rules` for the
142
+restrictions that apply to hard-IRQ handlers.
143
+
144
145
.. _rp2_Pins_and_GPIO:
146
0 commit comments