-
Notifications
You must be signed in to change notification settings - Fork 144
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
uart rx overruns #7
Comments
Hello,I am glad that you find this project useful.
Hi Andre,Thanks a lot for adding stm32 support to qemu!I'm having some troubles with the USART though, maybe you can help me out. If data is received too fast from the host to the stm32 uart, I get a sort of overrun on the emulated receive path, both when polling USART_SR_RXNE and when using interrupts. Let me describe the symptom with an example:
|
I just did, and indeed the problem does not occur when using telnet.
I already stated with some basic printf-style debugging yesterday before Thanks for helping me out, Ico :wq |
Great. I'm glad it worked. Unfortunately, there are a lot of quirks like that...
I just did, and indeed the problem does not occur when using telnet.
I already stated with some basic printf-style debugging yesterday before Thanks for helping me out, Ico :wq |
Hi! I think I ran into this today, though with tx instead of rx. I've got some chopstx-based firmware I am debugging with your project (thanks!) but I wired up the UART for I/O and while at first it seemed stable, the more prints I added the likelier it was to see hangs. It's inconsistent, and I haven't pinned it down for sure yet -- but if I don't solve it soon I plan to make a minimal test case project -- but it seems to be that when output is sent too fast to the UART it drops. I ran I ran with I think this is probably related to f28e8a5#diff-f44b64de825a4c23e77c796039da3773. UART2 and UART3 need to be enabled through those removed registers, as can be seen in libopencm3's implementation: I haven't tried running qemu itself in gdb, but I have started adding DPRINTFs here and there to it. I might have more insights later this week! I'm going to keep taking a look at this. qemu_stm32 is pretty important for making my project reliable, so I'm motivated to help it get better. |
Hello, sorry for the delay. I am not sure exactly what is happening, and am a bit tied up with other projects to look into it deeply right now. But, if you do get some minimal test case project, let me know as this would definitely help with troubleshooting... Thank you |
We may have figured it out the root cause of this: #30 |
After trying to move some of that code around a bit, I don't think that's the root-root cause, but it's somehow related. I am hoping it helps someone get some insight. |
Hi Andre,
Thanks a lot for adding stm32 support to qemu!
I'm having some troubles with the USART though, maybe you can help me out. If data is received too fast from the host to the stm32 uart, I get a sort of overrun on the emulated receive path, both when polling USART_SR_RXNE and when using interrupts.
Let me describe the symptom with an example:
after this, nothing happens, the remaining 3 chars do not arrive. But then:
etc.
So it seems that the received bytes are queued somewhere within qemu, but the stm32 is not informed of waiting bytes by the RXNE flag.
Am I doing something wrong with wrong assumptions, or could this be a bug in the stm32 usart code?
Thanks!
The text was updated successfully, but these errors were encountered: