stm32: BufferedUart does not expose hardware receive errors
The interrupt-driven BufferedUart clears and logs hardware parity, framing, noise and overrun flags without exposing them to its caller. At current main 1d0a7b2386169474821c840c6dca644e3217e43d, the interrupt handler reads the status, acknowledges the flags and emits warnings; BufferedUartRx::read only returns Ok(count) or remains pending. The same gap exists at our pinned revision 77afe6cf4ac346c15b78d5991ae40fdbc3e300e8.
Trigger: a USART receive fault sets PE, FE, NE or ORE and the buffered handler services it. Expected: the application can detect which fault occurred through a supported API.
Actual: the fault is available only through driver logging; matching the read result for Error::Overrun, Error::Framing, Error::Noise or Error::Parity cannot observe it. An application therefore cannot use zero read errors as evidence of zero hardware overruns, or maintain hardware-fault telemetry independently of log capture.
Our use case is USART1 on STM32G0B1RE at 921600 baud with RTS/CTS. The full-software-ring backpressure change in 844c4e7b is already in our pin; this report concerns the hardware fault visibility that remains.
Please expose the observed hardware faults through a supported API, with defined behavior for simultaneous flags, read cancellation and a full software ring. Allocation-free counters or retained error status would let applications collect faults without depending on interrupt logging. On FIFO-equipped parts, the implementation should also account for errors associated with later entries, not only the interrupt's first status snapshot; STM32G0 RM0444 section 33.5.4 describes PE/FE/NE flags stored with each FIFO entry.
Thanks !!
Source: embassy-rs/embassy