embassy-stm32: I2C timeout can consume all CPU
Author: nathanaelgCreated Sep 22, 2026Updated Sep 24, 2026
Both blocking and DMA/async versions of I2C end up calling master_write which has a tight loop waiting for the start bit to be cleared https://github.com/embassy-rs/embassy/blob/main/embassy-stm32/src/i2c/v2.rs#L219-L221
If it doesn't get cleared for some reason (still working out why that is happening!) it can just be constantly checking the time against the timeout and block everything else running. Especially for the async case this isn't what I expected and beyond having very short timeouts is a bit of a problem for any more real-time system.
Source: embassy-rs/embassy