Enum stm32f3xx_hal::serial::Error [−][src]
#[non_exhaustive]
pub enum Error {
Framing,
Noise,
Overrun,
Parity,
}
Expand description
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Framing error
This error is thrown by hardware when a de-synchronization, excessive noise or a break character is detected.
Noise error
This error is thrown by hardware when noise is detected on a received frame.
RX buffer overrun
Cause
An overrun error occurs when a character is received when RXNE has not been reset. Data can not be transferred from the shift register to the RDR register until the RXNE bit is cleared. The RXNE flag is set after every byte received. An overrun error occurs if RXNE flag is set when the next data is received or the previous DMA request has not been serviced.
Behavior
- The RDR content will not be lost. The previous data is available when a read to USART_RDR is performed.
- The shift register will be overwritten. After that point, any data received during overrun is lost
Parity check error
This error is thrown by hardware when a parity error occurs in receiver mode.