You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use the USART2 peripheral on my stm32f030RC. I'm not using interrupts, so from time to time an overrun interrupt is to be expected (and is acceptable); however I am unable to manage the error with the tools provided by the API.
When an overrun occurs the serial.read method returns an error accordingly, but:
the Peripheral.USART2 reference has been passed to the Serial object, so I cannot access its ICF register to clear the ORE bit.
I cannot set the OVRDIS bit and ignore every overrun because the Serial constructor resets the CR3 register (https://docs.rs/stm32f0xx-hal/0.14.1/src/stm32f0xx_hal/serial.rs.html#350); I cannot change it afterwards because the USART2 reference is gone and that bit cannot be changed while the peripheral is on.
How do I manage overrun errors? Either clearing the flag or disabling it altogether would be fine for me.
I'm trying to use the USART2 peripheral on my stm32f030RC. I'm not using interrupts, so from time to time an overrun interrupt is to be expected (and is acceptable); however I am unable to manage the error with the tools provided by the API.
When an overrun occurs the
serial.read
method returns an error accordingly, but:Serial
object, so I cannot access its ICF register to clear the ORE bit.Serial
constructor resets the CR3 register (https://docs.rs/stm32f0xx-hal/0.14.1/src/stm32f0xx_hal/serial.rs.html#350); I cannot change it afterwards because the USART2 reference is gone and that bit cannot be changed while the peripheral is on.How do I manage overrun errors? Either clearing the flag or disabling it altogether would be fine for me.
Edit: this problem would be resolved by PR #63
The text was updated successfully, but these errors were encountered: