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
Move uart writes from ISR on STM32 #1874
Conversation
06e6bc9
to
75dcfe3
Compare
Testing in progress; test script should get to 1000 RX power cycles in about a week. It powers the receiver for 5-10 minutes (random) then powers off, waits 30-60 seconds and repeats. Serial activity is monitored and logged; serial data timeout is 10 seconds; no data for 10 seconds marks the attempt as a failure. |
Preliminary test results: On this PR branch I got 0 errors out of 100 test runs; so far so good. Fun fact: I had to switch to R9M TX module because Happymodel ES900TX doesn't have external power and TX16S battery was discharging even when connected to a USB charger putting out 11W (5V 2.1A). |
75dcfe3
to
9f8e030
Compare
Finally maybe someone has found where the problem was, I'm testing now, I'll update you, thank you very much for now. |
After 5 hours of testing no problems found, normally no one has ever exceeded 3 hours without a firmware lock, sometimes even after few minutes. |
Made about ten FPV flights, never a problem, when before at least once out of three the rx stopped working. |
9f8e030
to
72e2dcb
Compare
No errors after 400 test cycles, I think it's ready for merging :) |
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.
Nice catch @alteman
Should this be targeting the v3 maintenance branch and we can get it in the 3.0.1 release? |
I think that would be a very sensible idea! |
72e2dcb
to
c5ff695
Compare
c5ff695
to
3c5911d
Compare
3c5911d
to
a0b3838
Compare
If there are no other things immediately to enter 3.0.1 should be released because this problem is not irrelevant imho. |
EDIT: related issue #1873
OK, here's a draft PR - I'm still testing, so at this point unsure if the issue is actually fixed.
The alternative workaround is increasing Arduino tx buffer to 128 bytes using -DSERIAL_TX_BUFFER_SIZE=128