-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fixed: #3900 #4452 #4689 stm32 Uart::read_until_idle() #4727
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
base: main
Are you sure you want to change the base?
Conversation
…ad_until_idle added: examples/stm32u5/uart.rs tested on stm32u545re-nucleo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks!
Thanks for fixing but I see in my example, that the first For the rest it works fine. I also tested the example with the change for an other CPU. debug log:
Changing the loop to, zero read is catched and the rest works fine. match uart.read_until_idle(&mut buffer).await {
Ok(0) => error!("Zero bytes"),
Ok(len) => {
info!("{}", &buffer[0..len]);
uart.write(&buffer[0..len]).await.unwrap()
}
Err(err) => error!("Error: {}", err),
} Debug log
|
I don't have h5 devices and i am unable to reproduce this issue on u5. |
I also have a
This one after 44 sec.
I am just using Putty and just random typing quickly. |
This maybe caused by noise. Ok(0) is acceptable if there is no data error(loss or repetition or other). And this can be solved in user code. |
It is fine for now. My application is currently not in the proper state to test this properly. About the example: Why not printing the error in the error path? |
I noticed there is |
added: examples/stm32u5/uart.rs
tested on stm32u545re-nucleo