Skip to content

Commit f28671f

Browse files
committed
docs/library/machine.UART: Extend the documentation for UART.irq.
For more ports and trigger options, based on the state of PR #14040. Signed-off-by: robert-hh <robert@hammelrath.com>
1 parent 00effe0 commit f28671f

File tree

1 file changed

+46
-3
lines changed

1 file changed

+46
-3
lines changed

docs/library/machine.UART.rst

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,54 @@ Methods
193193

194194
- ``UART.IRQ_RXIDLE`` interrupt after receiving at least one character
195195
and then the RX line goes idle.
196+
- ``UART.IRQ_RX`` interrupt after each received character.
197+
- ``UART.TX_IDLE`` interrupt after or while the last character(s) of
198+
a message are or have been sent.
199+
- ``UART.BREAK`` interrupt when a break state is detected at RX
196200

197201
- *hard* if true a hardware interrupt is used. This reduces the delay
198-
between the pin change and the handler being called. Hard interrupt
202+
between the pin change and the handler being called. Hard interrupt
199203
handlers may not allocate memory; see :ref:`isr_rules`.
200204

201205
Returns an irq object.
202206

203-
Availability: renesas-ra, stm32.
207+
Due to limitations of the hardware not all trigger events are available at all ports.
208+
209+
.. table:: Availability of triggers
210+
:align: center
211+
212+
============== ======= === ====== =====
213+
Port / Trigger RX_IDLE RX TXIDLE BREAK
214+
============== ======= === ====== =====
215+
STM32 yes yes
216+
ESP32 yes yes
217+
RP2040 yes yes yes
218+
MIMXRT yes yes
219+
SAMD yes yes
220+
RENESAS-RA yes
221+
NRF yes yes
222+
CC3200 yes
223+
============== ======= === ====== =====
224+
225+
226+
.. note::
227+
- At the RP2040 port UART.IRQ_TXIDLE is only triggered when the message
228+
is longer than 5 characters and the trigger happens when still 5 characters
229+
are to be sent.
230+
231+
- At the SAMD port UART.IRQ_TXIDLE is triggered while the last character is sent.
232+
233+
- At the RP2040 port UART.IRQ_BREAK needs receiving valid characters for triggering
234+
again.
235+
236+
- The ESP32 port does not support the option hard=True.
237+
238+
- At the STM32F4xx using the trigger UART.IRQ_RXIDLE the handler will be called once
239+
after the first character and then after the end of the message, when the line is
240+
idle.
241+
242+
243+
Availability: renesas-ra, stm32, esp32, rp2040, mimxrt, samd, nrf, cc3200.
204244

205245
Constants
206246
---------
@@ -213,7 +253,10 @@ Constants
213253
Availability: esp32, mimxrt, renesas-ra, rp2, stm32.
214254

215255
.. data:: UART.IRQ_RXIDLE
256+
UART.IRQ_RX
257+
UART.IRQ_TXIDLE
258+
UART.IRQ_BREAK
216259

217260
IRQ trigger sources.
218261

219-
Availability: stm32.
262+
Availability: renesas-ra, stm32, esp32, rp2040, mimxrt, samd, cc3200.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy