-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
CRSF baud rate is incorrect. #12398
Comments
Note that users of ELRS using SPI-based RX will be unaffected by any baud rate changes as there's no CRSF UART involved. |
After a bit more digging, CRSF V3 users may be less affected because the baud rate is auto-negotiated, and the Rx tells the FC what baud rate to use. However, for CRSF V3, if there are 3 CRC errors in a row after baud-rate negotiation BF will drop-back to the pre-negotiated baud rate without the receiver knowing and the receiver somehow has to handle it, but from the little information I have (in the official specs) it's unclear how the receiver is supposed to handle a baud-rate-change on the FC, if at all. It can also do this during flight, after arming, as I couldn't find any arming status check before dropping back to the pre-negotiated baud rate.
|
Yes, it's true that the correct baud rate is 416666. |
Looks like Kiss V1 was also affected by this, at least according to this comment in the ELRS codebase (link below), perhaps @fedorcomander can confirm what baud rate new KISS firmware is using for CRSF these days? |
Kiss 400000
Ultra 400000 and 2000000 v2/v3 auto negotiation. (afair on KISS F3 cpus its 1000000 max, but frankly never seen it), follow TBS protocol specs. With auto negotiation.
All my ERLS works fine ;)
… On 21 Feb 2023, at 21:18, Dominic Clifton ***@***.***> wrote:
Looks like Kiss V1 was also affected by this, at least according to this comment in the ELRS codebase (link below), perhaps @fedorcomander <https://github.com/fedorcomander> can confirm what baud rate new KISS firmware is using for CRSF these days?
https://github.com/ExpressLRS/ExpressLRS/blob/c5f67bd28a9f559a0bba3a4bcf509a4340445df5/src/user_defines.txt#L48-L50 <https://github.com/ExpressLRS/ExpressLRS/blob/c5f67bd28a9f559a0bba3a4bcf509a4340445df5/src/user_defines.txt#L48-L50>
—
Reply to this email directly, view it on GitHub <#12398 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAQBCCXN4XYAJHQSPWU2MUTWYUPINANCNFSM6AAAAAAVC6S4UI>.
You are receiving this because you were mentioned.
|
In fact receiver may request any baud rate. :) on v3.
… On 21 Feb 2023, at 21:18, Dominic Clifton ***@***.***> wrote:
Looks like Kiss V1 was also affected by this, at least according to this comment in the ELRS codebase (link below), perhaps @fedorcomander <https://github.com/fedorcomander> can confirm what baud rate new KISS firmware is using for CRSF these days?
https://github.com/ExpressLRS/ExpressLRS/blob/c5f67bd28a9f559a0bba3a4bcf509a4340445df5/src/user_defines.txt#L48-L50 <https://github.com/ExpressLRS/ExpressLRS/blob/c5f67bd28a9f559a0bba3a4bcf509a4340445df5/src/user_defines.txt#L48-L50>
—
Reply to this email directly, view it on GitHub <#12398 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAQBCCXN4XYAJHQSPWU2MUTWYUPINANCNFSM6AAAAAAVC6S4UI>.
You are receiving this because you were mentioned.
|
Do you need to customise ELRS to use the 400K baud rate on RX or is that automatic too? |
@fedorcomander Which version of the spec document did you follow? As the baud rate changed between Rev 7 and Rev 10, see OP above. |
oh. interesting. i was not aware of that. will poke trappy. thanks. so far none of my clients had any issues btw. ---Cheers,AlexOn 22 Feb 2023, at 19:58, Dominic Clifton ***@***.***> wrote:
follow TBS protocol specs. With auto negotiation.
@fedorcomander Which version of the spec document did you follow? As the baud rate changed between Rev 7 and Rev 10, see OP above.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
anyhow. tbs is tad faster then 400kb. but it works fine on 400 withing range. since i dont have any issues with og devices - nog gonna change it. ---Cheers,AlexOn 22 Feb 2023, at 20:05, Alex Fedorov ***@***.***> wrote:oh. interesting. i was not aware of that. will poke trappy. thanks. so far none of my clients had any issues btw. ---Cheers,AlexOn 22 Feb 2023, at 19:58, Dominic Clifton ***@***.***> wrote:
follow TBS protocol specs. With auto negotiation.
@fedorcomander Which version of the spec document did you follow? As the baud rate changed between Rev 7 and Rev 10, see OP above.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@hydra please post links to the TBS CRSF specifications. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within a week. |
Issue closed automatically as inactive. |
@haslinghuis Please can you re-open this, official confirmation from TBS is here: tbs-fpv/freedomtx#26 (comment) Edit: and ideally pin this, until it's resolved somehow, rather than automatically closed by a bot. |
My doc from 14.08.2017 Rev 07 doc says 416kbaud :) Lol... |
we should just change it |
this is my feeling too, it's currently incorrect and should be corrected. I'm not sure how happy other projects will be about it though, as they will have to communicate this to their users. Suggest co-ordinating the change with the devs of at least the ELRS project. |
i plan to make it configurable on ultra. ;) just in case ;) may be you should do the same. ---Cheers,AlexOn 26 Sep 2023, at 13:11, Dominic Clifton ***@***.***> wrote:
we should just change it
this is my feeling too, it's currently incorrect and should be corrected.
I'm not sure how happy other projects will be about it though, as they will have to communicate this to their users.
Suggest co-ordinating the change with the devs of at least the ELRS project.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Not sure if that's a good idea, traditionally all RX protocols, that I can remember, have used a fixed baud rate associated with the protocol. Every additional option only serves to complicate things, confuse the user and generate more support issues. |
you dont say ;) still. run on 400 with zero issues for last 6 years. i think uart allows 5% error easy. ok. shutting up. game changes dramatically if cpu clocked internally. especially h7. ask me how i know. ;)---Cheers,AlexOn 26 Sep 2023, at 13:25, Dominic Clifton ***@***.***> wrote:
i plan to make it configurable on ultra. ;) just in case ;) may be you should do the same.
Not sure if that's a good idea, traditionally all RX protocols, that I can remember, have used a fixed baud rate associated with the protocol.
Every additional option only serves to complicate things, confuse the user and generate more support issues.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Closing because the difference is small. ELRS deals running their baud rate report no errors. A project to refresh CRSF is underway. This specific issue can be laid to rest for now. |
why not just correct it in BF if the difference is so small that the error difference will not be noticable? it's kinda silly to drift off-spec like this and currently just serves to confuse people. |
@ctzsnooze : There may be other error sources (internal RC and possibly others). Wasting baudrate margin is not a good idea |
The current situation provably works and eLRS and others have standardised on 420K as this was the observable implementation of CRSF at the RX. So please can we close this and move on? This is pedantry and not related to observable issues. 420K is an easy to use number already implemented without issue. |
I have a request, add the following command. |
Unfortunately only @hydra makes sense here. Pedantry to keep to the standard instead of reinventing your own square wheel and call it OK :) That is not pedantry. Thats laziness and ignorance. God luck. :) |
It seems that this is too difficult a task for you. Therefore, it is easy to attribute it to pedantry. Good luck. :) |
i can say exactly the same about your task. ;) |
In my recent testing here, as the hardware designer of at least 4 UART based ELRS RX's now, using both the ESP32 Pico D4 and the ESP32S3 I can 100% say that you DO notice observable errors and corruption of the data when using the wrong baud rate. |
Thank you @hydra and @haslinghuis |
Do you have any data showing how serious the problem is? |
i have arc error counter on the osd. at some flight was more then 1000 errors. apparently some packets were OK after arc check, but had WRONG channel data, so it was affecting flights.
… Do you have any data showing how serious the problem is?
|
What is the "arc error counter" that can be placed on the OSD? EDIT: Or wait, are you referring to while running at 400k baud? We need to separate out "getting errors at 400k baud" vs "getting errors at 420k baud". |
crc---Cheers,AlexOn 8 May 2024, at 16:42, Bryan Mayland ***@***.***> wrote:
i have arc error counter on the osd
What is the "arc error counter" that can be placed on the OSD?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Ah you mean CRC!!! sorry that part was hard to spot. |
Just commenting that #13614 does not fix/complete this issue and that BF is not following the CRSF specification outlined in the OP here: #12398 (comment) Users wanting a build of BF that follows the CRSF spec have to add Additionally the authors (@tbs-trappy) of CRSF and the spec commented here https://github.com/betaflight/betaflight/pull/13614/files#r1596251113 | tl;dr: suggest to fix problem at the source. 416.6 is correct |
Describe the bug
The baudrate for CRSF is defined as 420,000baud. This is incorrect. Trappy from TBS confirmed to me today that CRSF uses 416,666 and always has. I've not verified this statement however.
When the wrong baud rates are uses (e.g. RX/FC mismatch) then FCs will get framing errors, data corruption, CRC mismatches and packet loss for RC channel data. (Verified by inspecting UART
ISR
register and looking at theFE
flag).Related information:
Code:
BF - https://github.com/betaflight/betaflight/blob/master/src/main/rx/crsf_protocol.h#L30
ELRS - https://github.com/ExpressLRS/ExpressLRS/blob/c5f67bd28a9f559a0bba3a4bcf509a4340445df5/src/lib/OPTIONS/options.cpp#L84
Rev10 CRSF docs:
Rev7 CRSF docs:
To Reproduce
Use mismatched baud rates on RX and FC.
Expected behavior
No data corruption or packet loss for users of both TBS and ELRS receivers.
Support ID
Flight controller
N/A
Other components
No response
How are the different components wired up (including port information)
No response
Add any other context about the problem that you think might be relevant here
No response
The text was updated successfully, but these errors were encountered: