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
4.3 RC3 major latency issue while in dshot600/8k with FOXEERF722V2 #11385
Comments
What receiver do you use? I have two F722 based DJI equipped quads using Crossfire with no such issues. For there to be half a second lag something would have to buffer up half a second’s worth of RC commands and nothing in Betaflight does that! |
Currently using same Happymodel EP1 ELRS RX's in all my quads, and Happymodel ES24TX Pro TX. |
Please make a log and share it here. |
Just want to chime in that i am also having this same issue, with an iflight f7 twing and BetaFPV rx on elrs 2.2 dshot600 + 8k pid results in a half second delay to input on the quad. Switching to dshot 300 +4k fix's it. |
I stay in gyro_scaled for the logging mode ? Or anything else maybe ? |
What packet rate are you using on the RX? The following logs would be useful. Only a few seconds of each, taken both in the working and non working case.
|
Ok I will do that 👍 |
Ok just did 2 batteries in my both quads which had the issue to take log records and no more latency issue in dshot600/8k ! weird... |
@AndroidGX any update on this issue? |
Was about to update today, yup. |
I went to get the requested logs and my issue was also resolved. I switched back to gyro_scaled and no longer had the issue that AndroidGX still has so i am unable to reproduce. |
Hi guys, some fresh updates from today. I recorded all the requested logs for debugging : The main issue of the logs is that I NEVER faced the latency issue while I recorded all the logs from both DSHOT600 and DSHOT300 folders. BUT, I felt some slight latency issue again when I recorded on gyro_scaled and 4kHz (but not in 8kHz). So to sum-up, in my case the latency appeared only when I record blackbox in 4kHz and in gyro_scaled mode. |
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. |
Any news of this issue ? |
No-one appears to be investigating this. I suspect no-one will until a method to reliably re-produce the issue is found. Can you confirm that one of the logs your recorded DOES have evidence of the latency or not, and if so which log file and at what time index so that when someone does investigate this they will not have to trawl the history and logs as much. i.e. make it easy for someone to help investigate this. |
As previously said, all the recorded logs above can't show any latency issue, but sometimes it still appears in 2 of my quads while on dshot600 and when I try to record gyro_scaled. I can't do anything else but for me this issue is still present then. I'm now obliged to set dshot300 in my F7 cpus (which is sad), unfortunately. |
so this happens when logging? you're logging at a 1/1 rate and that's probably the reason. You shouldn't need to log at more than 1/4 at 8K unless you have very special needs. If you really need to log at such a high rate, you can have a look at the new |
@klutvott123 I think @Quick-Flash was also having latency issues with logging even on a H743. Probably related to #11485 |
no latency issues, flies fine, just stuttering in the logs. Just missing parts of the logs |
I'm guessing that the latency issue is likely with the scheduler not servicing the blackbox logging code like it used to, or that the there is some other issue with the updated spi code that uses the flash to log. would be interesting to see if there is a difference between 1-bit spi, octo-spi flash, 1-bit sdio or 4-bit sdio. certainly 4 bit quad-spi and 4-bit sdio on my H750 FC's worked at 8k(gyro)/8k(pid)/8k(logging). Seems like someone needs to do a bit of investigation on a variety of MCUs and logging systems and report their findings comparing BF 4.2, BF 4.3 pre-spi changes, 4.3 post-SPI changes and 4.3 current master with scheduler changes. Seems like a lot of work... |
@hydra Looks like a completely different issue to me. The issue described by @Quick-Flash has been a problem forever. My matekF722 has always had gaps in logs like that |
@klutvott123 even on 4.2? |
@hydra I don't remember, but it was like that on 4.0 and 4.1 |
@hydra Good grief man. Quit with the unfounded digs at the scheduler. The scheduler doesn't "service" the blackbox logging code. That's called, as it ever was, from the PID task, which is called with better regularity now than it ever was. Gaps in the log are caused by the FLASH not responding fast enough. Prior to every write the device's status register must be polled in case it is busy and the FLASH driver passes this to the SPI driver to handle using the Some FLASH devices just take too long on each write to keep up. It's got nothing to do with the transfer of data into the device over SPI. We don't buffer up blackbox data beyond a sensible limit; excess data just gets dropped.
|
My apologies, yes it was a guess. I stand corrected. Thanks for refreshing my memory on where the BB logging was called from, I wasn't remembering correctly. That code has 'just worked' for me for a number of years so have not had to look at it recently. @thenickdude did such a great job on it! Yes, I'm aware of the differences between write speeds, that's usually more of an issue on SD cards which have much more variable latency. Can you think of anything else that's changed recently which might be affecting the logging performance? I'm struggling to think of anything other than my previous guesses. |
I did another 2 lipos today to test recording blackbox in 2kHz mode (GYRO_SCALED) and no issue so far. |
Not sure if this is related but after I updated my Crossfire to 6.17 I am having a 1s latency on my sticks to quad movements as well. I have two quads with this same issue. I'm using a TBS Tango 2 and have a Nano RX in both quads. Both have the same flight controller (Speedybee F7) and running BF 4.3 RC3. I wonder if it's related to the OPs issue? I'm downgrading my crossfire firmware down to 6.07 to see if issue goes away. |
@dinesh21400 please try CRSF 6.17 with latest development firmware. Details:
|
This happened to me only after upgrading to 6.17. I did this yesterday using Agent M so I'm assuming it's latest firmware. Should I also do something else? |
Save your diff and use detect button to detect right target |
#11472 doesn't rely on a particular firmware version, and 6.17 doesn't need the PR to work. The PR and firmware 6.17 will both make the RX use CRSF V2. But I don't know if there are other issues with 6.17 |
I just tried with the build you said and used 6.07. It seemed to work fine on that. I'm now going back to 6.17 and going to try again. |
Ok so that's what I thought. If I reproduce the issue with 6.17 again then I know foe certain that's what's happening. Hopefully I don't destroy my quad in the meantime. |
TBS is very safe (using over 3 years) - even while bench testing. Awaiting interesting results on going back to 6.17 as the new firmware should already enforce CRSF V2 |
Ok just did the test with 6.17. Have the issue. There is a ton of latency. Most noticable on flips. I almost crashed a couple times but was able to bring it safely down. I'm downgrading till this issue is resolved. |
Thanks for testing. @klutvott123 please take note. |
The reason is that the bf4.3 has very aggressive scheduler code that will prioritize pid and gyro over everything else. Meaning that your rc command will not be processed because the scheduler is deciding to instead run the pid/gyro, and it won't run the rc command code even if it has time to, but thinks it would be to close to another gyro read. I'm hoping that these issues get resolved. |
Thanks for that but how come it was running fine with RC3 on v 6.07? Shouldn't it affect both versions equally? |
Just curious but I noticed force telemetry was turned on after FW update. I had turned this off in the past. Could having that on cause extra latency? |
@dinesh21400 Yes. It means it can switch down to 4Hz update rate. It's a likely explanation for the latency you're seeing. |
I hate myself. Thanks. I wish it wouldn't default to that after a FW update. |
Everybody in this room please keep testing with latest development firmware and report back please. |
OK will do, I stay you guys tuned. |
Hey, forgot to report back but I did tried with latest development firmware 3 days ago (before RC4) and feel like there is much less latency, but still a bit so I still can't really freestyle with logging in 4kHz, but I feel the improvement. |
Ok finally tested in RC4 (in one of my two yet quads) and guess what ? problem finally gone ! Do someone else in this room did tried RC4 and please report if also resolved from you sides ? |
Fixed in RC4 |
Describe the bug
Hi there,
I had zero issue while beeing in both 4.3 RC1 and RC2 in a short time for this last. Currently I'm on RC3 which still have the same problem.
Since I updated my ELRS to 2.2.0 (coming from 2.0.1 previously), I have a big latency issue (like half a second, near a full second) in my sticks input controlling my quad.
I had the same issue in both of my quads (not the third one based in another FC), which are both equiped with Foxeer F722 V2.
After having a long conversations from the ELRS Discord with various admins, telling me and concluding it was not fault of ELRS at all. I tried to go back to ELRS 2.0.1 with same major latency issues. While I flashed back 2.2.0, one of the admins from ELRS told me to try to go back to dshot300 and 4k pidloop (I was at 600 and 8k/8k before), this successfully solved my issue.
Strangely, a friend of me which also have the same Foxeer F722 V2 FC, just recently updated to 2.2.0 without any issue at all staying in dshot600/8k.
So now I’m wondering why in both my Foxeer F722 V2 I’m now forced to stay at dshot300 and 4k pidloop to avoid this major latency issue ? for now I’m opening this ticket and will be glad to flash any test version that could fix the problem.
If it can help, the CPU never reached more than 58% as shown from the configurator, same story in my second quad with the Foxeer FC too.
Let me know if you guys needs any further information.
Many thanks in advance for watching this case.
To Reproduce
Be on ELRS 2.2.0
BF 4.3 RC2 or RC3
Having Foxeer F722 V2 FC
stay on dshot600 8k/8k
Expected behavior
no major latency issue (like simply returning in dshot300/4k)
Flight controller configuration
Flight controller
FOXEERF722V2 (Foxeer F722 V2)
Other components
ESC 4IN1 Tekko32 45A (1st quad) & Mamba F50 Pro 4IN1 (2nd quad)
both ELRS 2.2.0 for now.
How are the different components wired up
classic vista setup, directly soldered. I generally make over clean builds with best gyro place not touching anything, etc.
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: