-
Notifications
You must be signed in to change notification settings - Fork 6
First test run usually fails #76
Comments
Some more notes. First, I've asked myself if cargo-embed (or the act of flashing the boards in general) could somehow trigger this issue.
So to summarize, after the error occurred:
I don't know what to make of this. Next, I've asked myself why the break condition occurs when communicating with the the assistant, not with the target.
I'm now starting to look into the test cases themselves, and if the order of operations there might affect how the error occurs. |
This has gotten really weird :-) So, the error is somehow caused by the code on the assistant that detects whether the RTS signal has changed. For some reason, it detects changes under the circumstances described above. And for some reason, it trying to notify the host about this, somehow causes the break condition. My best guess is that the specific circumstances I described before cause electrical noise (and while it would be fascinating to dig into this, I don't think getting a degree in electrical engineering would be the best use of my time right now), that electrical noise causes the assistant to send messages to the host, and because all of this is going on while the host is connecting, it's too early for those messages, to which Linux reacts with the break condition. All of this is speculation, but it kind of makes sense. I think the most practical way to solve this is to prevent the assistant from sending those messages. Either by somehow filtering out the noise, or by changing the protocol so that the host has to ask for changes, instead of the assistant just sending them. |
After connecting the target/assistant and flashing the firmware, the first run of the test suite usually fails.
Output from an example run:
Log output of the assistant:
The target shows no sign of problems.
Doing a reset of the target and assistant using the reset button on the boards fixes the problem for me. Subsequent test runs are 100% reliable, as far as I can tell.
I've been aware of this problem for a while, but initially assumed that it is a problem with my machine (at the same time, I started seeing weird USB issues which have since gone away). I've received confirmation that others are having the same problem, so its definitely not something specific to me. If I recall directly, I was doing work on the USART API in LPC8xx HAL when I first saw this, so this might be an issue I introduced there.
The text was updated successfully, but these errors were encountered: