-
Notifications
You must be signed in to change notification settings - Fork 1k
Hardware serial port RX locks up after overrun error. #494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
|
Hi @benwaffle |
I tried the 2 patches from @ppescher but that did not fix it |
Ok. Thanks for the test. |
sizeof(buf) |
@uzi18 The code compiles just fine. You only need the parenthesis for types, not variables. |
Hi @benwaffle |
I will try that, but |
@benwaffle the issue is with |
I didn't see you used printf which is mainly used for debug purpose. |
I think all you need is `HAL_NVIC_DisableIRQ(serial_debug.irq)` since the IRQ number is set during initialization.
|
@ppescher good catch, that makes it easier |
@ShenRen you shouldn't need to. To clear the error bit on STM32F1 (and I assume F4 as well), you just need to read the error flag and then read to the data register, which the code is doing. |
@ShenRen you are right that my patch in |
About |
Resolved thanks #502 |
Describe the bug
When you run the following code, and start spamming words (followed by the enter key) on your keyboard, eventually it stops reading data. You can also lock it up by just hitting enter without any letters. The USART1 interrupt stops firing, because the code seems to fail to set TXEIE. It also appears to only happen when there's an overrun error as verified by looking at USART_SR with gdb.
To Reproduce
Steps to reproduce the behavior:
pio device monitor
)Expected behavior
Continue receiving input, possibly by dropping the next character.
Desktop (please complete the following information):
Board (please complete the following information):
The text was updated successfully, but these errors were encountered: