[riot-notifications] [RIOT-OS/RIOT] core/*: many important system functions illegal inside ISRs (#10488)
notifications at github.com
Fri Nov 30 12:39:29 CET 2018
> With a slight queue lookup overhead, a numerical priority could be added to lessen this problem. I assume that anything needing a really fast response would be executed directly in the ISR, so the overhead might not be much of an issue.
The overhead is probably not a problem, just the latency caused by the sequential handling of interrupt events. While there are certainly no special latency requirements for data-ready interrupts of a gas sensor that only provides data once every second, the interrupt events in GPIO expanders must be handled immediately. So they should be prioritized.
> Wouldn't one get blocked no matter how you executed it on a single-core system, just because you can't be simultaneously executing code to use each bus? I suppose in principle you could run a little bit of another thread while waiting for a response, but SPI and I2C aren't set up that way in RIOT. Something at some point must decide the order of events.
If the `periph/i2c` and `periph/spi` implementations use hardware implementations for SPI and I2C, they could use`xtimer_usleep` to be blocked for a certain time before they polls the status of a transfer. In that case another thread could use another serial interfaces also on single core system. I don't exactly, but I would guess most implementations are simply busy waiting to poll the status.
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...
More information about the notifications