[riot-notifications] [RIOT-OS/RIOT] sys/stdio_uart: Add warning about use in ISR (#13985)

Marian Buschsieweke notifications at github.com
Sun May 3 21:48:15 CEST 2020

> IMO debugging alone makes stdio from ISR an important use case.

The proposal does not forbid users from using STDIO in ISRs. It just points out that people cannot expect this to work every time on every board. Indeed, debugging is especially pointed out as an example of when using STDIO over UART is not an anti-pattern to avoid.

Let's compare the situation to LTO, which is also not officially supported: It is known that LTO can be perfectly reliable for many use cases, but currently it sadly will break some stuff. But people with the right understanding can still use LTO happily. And hopefully the remaining bugs exposed by LTO get eventually fixed so that eventually LTO can be officially supported.

Note that the alternative to not officially supporting STDIO over UART from ISR is to *do officially support* it. And there are systems on which this is just not feasible. 

> They might still be offline _after_ the interrupt that caused a wakeup. IMO this is the case on most platforms, the PLLs need some time to get to the configured clock, which often messes with the first (few) characters after waking up from deep sleep.

This honestly concerns me more that not using STDIO from ISR in production systems. Won't other clock domains be equally affected to this? If e.g. an SPI transfer is occasionally unreliable after a wake up e.g. because a transceiver signaled reception of a frame, a correctly received frame might get corrupted during transfer from the transceiver. This is pretty worrying :-/

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200503/120689cd/attachment-0001.htm>

More information about the notifications mailing list