SPI can suffer from overruns due to TX/RX asymmetry #350
Labels
robustness
Fixing this would improve robustness of deployed firmware
stm32
Has specific implications for STM32 processors
With the fix for #260, we will entirely fill the TX FIFO when we can. As the data there indicates, this results in better performance -- but it also introduces an asymmetry: because we will fill the TX FIFO as much as we can but only drain the RX FIFO a byte at a time, it is relatively easy to get into RX overruns. (This can be seen when doing operations that clearly exceed the FIFO size.) The overruns are then not handled well (see #349), resulting in an infinite loop. The fix is to do to the RX side what we did to the TX side: continue to drain it as long as we can. If/when the TX FIFO empties, SPI transmission will cease until it is refilled, assuring that we throttle on our true ability to drain.
The text was updated successfully, but these errors were encountered: