Skip to content
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

Complete configuration being wiped #7128

Closed
avsaase opened this issue Jun 16, 2021 · 180 comments
Closed

Complete configuration being wiped #7128

avsaase opened this issue Jun 16, 2021 · 180 comments
Labels

Comments

@avsaase
Copy link
Member

avsaase commented Jun 16, 2021

There seems to be an issue in 3.0 where the flight controller randomly loses its configuration. I had this problem once but assumed it was something I did wrong. However, since the 3.0 release, at least two other users on FB reported this problem so I think it is a bug.

The steps I took to get run into this problem were:

  1. Have a diff from a previous 3.0 setup
  2. Flash the 3.0 stable release
  3. Choose "Airplane without a tail" platform
  4. Restore diff
  5. Power cycle with a battery (don't know if it happens with just USB power)
  6. Notice the configuration has been wiped

The problem is I have done these exact steps 10's of times with the RC's and older beta builds, and only encountered this problem once. So far I have also not heard anyone running into this issue multiple times. I wouldn't know how to reproduce it again.

I realize that this makes it very difficult to find the cause so I'm opening this issue to collect more experiences. Maybe it rings a bell for someone.

@avsaase avsaase added the Bugfix label Jun 16, 2021
@semich
Copy link

semich commented Jun 16, 2021

Couple of point:
3 users complains about the same
all on F411-wse so far.
We setup the FC from scratch, all is ready for maiden.
Connect the FC again to inav for more checks of config and the FC is completely reset.
Matek says they are not aware of issues like this.
I had no issues on previous builds.

@avsaase
Copy link
Member Author

avsaase commented Jun 16, 2021

I forgot to add that this happened on my Matek F405-WSE.

@OptimusTi
Copy link
Contributor

Testing but quick note: I've been using a F411-WSE on 3.0 since 2.6 came out and have not seen the issue. Are we sure that the problem is not people forgetting to type save? :)

@avsaase
Copy link
Member Author

avsaase commented Jun 16, 2021

I am sure that is not the problem.

@semich
Copy link

semich commented Jun 16, 2021

Testing but quick note: I've been using a F411-WSE on 3.0 since 2.6 came out and have not seen the issue. Are we sure that the problem is not people forgetting to type save? :)

Seriously?! Sorry, we are very dumb peoples...

@CertainBot
Copy link

CertainBot commented Jun 16, 2021

Haven't seen this issue on F411-Wing... yet. Have reflashed the board several times this week and the only difference from the above mentioned steps is that I do not do 3. Choose "Airplane without a tail" platform, but the rest is all the same. The firmware is the one with double softserials enabled.

@rts18
Copy link

rts18 commented Jun 17, 2021

Experienced it a few months back using development FW. Was an F411_wing.

The Windows configurator has become very sluggish in 3.0. PID, Advanced and OSD tabs are very slow to open, And the reboots are slow sometimes too.

I've got into the habit of closing the configurator and power cycle the FC (USB only) after a flash. And do the same after loading diff all files.

@b14ckyy
Copy link
Collaborator

b14ckyy commented Jun 17, 2021

The Windows configurator has become very sluggish in 3.0. PID, Advanced and OSD tabs are very slow to open, And the reboots are slow sometimes too.

that's known because of a lot more stuff get's loaded on these pages compared to older versions. The developers know about this and will address it in the future. But that means a lot of rework how the Configurator communicates with the FC. For now we have to live with it.

regarding the main issue:
I have unfortunately (or luckily) not seen that yet on any of my planes. But Where I have seen a simular issue is on my U360GTS antenna tracker that is running on an SPRacing F3 witht he latest release candidate firmware. and it happened multiple times on one evening. Sometimes with battery power cycle, sometiomes with USB power cycle. All Config wiped.

So there is something that can indeed happen to the flash memory to lose all the config. The latest added feature to the tracker firmware is a home save option that can restore the last home point after a power loss. So the Tracker is writing to the flash memory while it is running.

I wonder if there is something in INAV that can write to the flash even when no settings is changed by the user and the plane was not armed and corrupts the flash storage?

@OptimusTi
Copy link
Contributor

It would be good to know the status of the LEDs if someone can reproduce the issue.

@avsaase
Copy link
Member Author

avsaase commented Jun 17, 2021

I've run into the problem a couple of times when restoring (parts of) diffs, but I cannot reproduce it reliably.

@semich
Copy link

semich commented Jun 17, 2021

its random, maybe 1 in 10/20 reboots...

@OptimusTi
Copy link
Contributor

its random, maybe 1 in 10/20 reboots...

When you say "reboots" are you talking about rebooting through CMS or power cycles?

@CertainBot
Copy link

CertainBot commented Jun 17, 2021

restoring (parts of) diffs...

This is a different story, happened to me yesterday just after posting my previous message. Copied maybe 25 diff lines because I have seen some red warning message and wanted to see what was it about. Without saving, and just exiting the CLI (which means reboot) and reconnecting to Configurator the setup message for selecting the type of vehicle appeared (as when starting from scratch).

@semich
Copy link

semich commented Jun 17, 2021

its random, maybe 1 in 10/20 reboots...

When you say "reboots" are you talking about rebooting through CMS or power cycles?

Yes. Unplug/ plus usb only, or battery only.

@OptimusTi
Copy link
Contributor

its random, maybe 1 in 10/20 reboots...

When you say "reboots" are you talking about rebooting through CMS or power cycles?

Yes. Unplug/ plus usb only, or battery only.

Cool. Next time it happens check the LEDs. I want to rule out a faulty DFU boot button.

@avsaase
Copy link
Member Author

avsaase commented Jun 17, 2021

I think it it very unlikely that this is a hardware issue. While two people have told me they encountered this issue before 3.0, the number of Facebook posts about this exploded after the latest release.

@avsaase avsaase closed this as completed Jun 17, 2021
@avsaase avsaase reopened this Jun 17, 2021
@CertainBot
Copy link

CertainBot commented Jun 17, 2021

It happened after a partial diff all load without saving and then close and reopen communications with configurator. Not even rebooting.
When full loading full "diff all" and save things have always went smooth.

@OptimusTi
Copy link
Contributor

I've noticed something strange. Following the steps requested to try and reproduce the issue, I noticed that after selecting the preset, I can go and click in the CLI or any tab. If I don't click away, the board reboots. Could this cause issues or miss something if I click away before this reboot?

@rts18
Copy link

rts18 commented Jun 18, 2021

I ran some more tests today. This time with a F411WSE. I noticed a discrepancy in the reboot cycle after choosing these model defaults. Sometimes it reboots and other times it doesn't.
Then after loading the diff all files and rebooting. It appears to complete the reboot for the model default. Which might explain why it clears the diff all settings.

As a side note. I have experienced the same issue with the OSD tab in 3.0.
It used to do a disconnect and reconnect of the FC 7456 after loading the font prior to 3.0. This could be heard via the USB audio on the PC. And the configurator would close down the OSD page on reboot, then reload the page again.
Now it disconnects after the font load, But the configurator doesn't always exit the OSD tab. If I try to change any of the font previews, it works for a bit then locks up until after a power cycle.

@NulliFieDFPV
Copy link

I am not sure if it's same issue.
Matek F405 WSE - Inav3.0.

Wipe didn't happen since flashed and several power cycles.

But at todays maiden after a not that hard crash all my settings are gone, too. I thought it may happened because lipo and gps unit have been ripped off and ejected, but sounds a bit related to this.

Since I already set up everything again, I don't have a lot further details but will keep an eye on this.

Regards, Ingo

@yesthisusernameistaken
Copy link

Suffering from this issue, these are the steps I take on a Matek 765.
Connected over USB, not trying to load a diff, starting from a clean slate.

Flash board with Inav using the latest configurator.
Connect up and it asks me to choose a pre-set (wing without tail), FC reboots.
Connect up again and change ports for GPS and RC link. Hit the save and reboot button.

Sometimes the settings are saved, sometimes not.
If the settings save, I got to the config tab to enable GPS. When I hit save, again sometimes it's saved, sometimes everything is reset to default (ports and other settings).

I "think" the mixer gets reset to default too as it asks me to configure it after a couple reboots (I'm not sure if that little popup the first time you connect is supposed to do it or not).

I've flashed it 2 or 3 times and the issues persist.
Tried doing it with the battery plugged in and no difference.

@semich
Copy link

semich commented Jun 21, 2021

It just happened to me again. I flew the plane this morning, all well setup, all good and great! Arrived at home, plug the USB to check/modify one thing and the board is clean again.... (F411-wse)

@b14ckyy
Copy link
Collaborator

b14ckyy commented Jun 21, 2021

Another report.

PSX_20210621_143239.jpg

@avsaase
Copy link
Member Author

avsaase commented Jun 21, 2021

Nope, still cannot reproduce. Neither with continuous trim on nor off.

@b14ckyy
Copy link
Collaborator

b14ckyy commented Jun 21, 2021

I tried on an F765 yesterday a lot. With presets applied, aborted by tab change, diff transferred and many other usual and unusual actions. Could not reproduce. Also tried a few times with an F411-WSE with no "luck".

Will do more tests. F411WSE seems to be the most prominent one.

@P-I-Engineer
Copy link
Contributor

just happened to me. Matek F411WSE.

the entire board was wiped. Did not even show up as a comport when plugged in to computer. I had to hold the boot button to get into DFU mode to reflash. Luckily, from knowing about this issue, i grabbed a diff yesterday.

last things i did:
i was in cli and changed some launch parameters, i think i forgot to hit save.

continuous servo autotrim is enabled.

@b14ckyy
Copy link
Collaborator

b14ckyy commented Jul 2, 2021

Now it hit me too.

Talon 250G. F411-WSE. No dump saved beforehand. It was flying fine last time. Today I wanted to connect it to the PC to get a diff for a friend and this screen welcomed me.

Screenshot_20210702-185251.png

Have to check the 2 other F411WSE setups too.

@MartinHugh
Copy link

MartinHugh commented Jul 23, 2022

Same aircraft, iNav 5. I removed the battery after it had been sat disarmed for about 5 minutes. On the next power up, the config had been wiped.

In my comment above, there is a build for MatekF405SE, could you test it?

@JulioCesarMatias Thanks, I first need to finish setting up the tune with the standard build. I have having some issues dialling in the mechanical trim at the moment. The biggest problem I see is that it is difficult to deduce anything certain when testing for intermittent faults. Nevertheless, once I get passed the setup and tune of this particular aircraft I will test your firmware. Thanks, Can you again summarise the changes and how this affects what I need to do (if anything)

And you can finish your settings with my build, it won't make a difference

Understood. I will finish the setup with the released version first and then switch. Note it is windy here for the next 3 days.

@JulioCesarMatias OK I have the mechanical trims set up and iNav tuned on 5.0.0. I am in a position to test a bug fix version now. I will will hang fire though until the results of @cpwilson have been reviewed. As I expect another test on this exact build will have little value now.

@MartinHugh
Copy link

Ahhh, that makes sense. That means your solution is the second best thing v.s. not saving to EEPROM at all. Definitely recommended for v5.1.0 if you ask me.

but I need to make sure that this will alleviate the problems... so I need several people who have the auto-erase problem to test my changes. I don't have and never had the auto-erase problem.

I understand. Problem is that I seldom run into the config wipe issue. And the last time it was because we unplugged a lipo just after disarm. So I'm not able to test and give a conclusive answer. Sorry.
A bit upwards in this thread @cpwilson and/or @dcamptell might be good candidates. They run a MATEKF405SE and MATEKF405TE_SD

I'll leave the .hex files here in case they are interested in testing
inav_6.0.0_MATEKF405TE_SD.zip inav_6.0.0_MATEKF405SE.zip

Will give this a test and report back.

OK tested 6.0.0 this morning and still have the config being wiped.

Steps taken I took a full dump of the config from 5.0.0 Flashed 6.0.0 to the FC Restored the full dump as using configurator for 5.0 unable to apply preset as only have cli access Checked config applied and all was working Power cycled the FC a few times, 4 or 5 and armed board whilst powered on and no issues FC seemed to boot up fine Powered off and left for 40 mins and when powered on FC config is wiped

Note, power cycles were done with flight battery

Have attached full dump file from 5.0.0 and diff from 6.0.0 after config saved and also one after config wipe

6.0.0 diff all after config wiped.txt 6.0.0 diff all after config.txt 5.0.0 full dump.txt

Thank you for doing this @cpwilson. Can you confirm you were testing short power on/power off cycles (which normally attempt to write to the EEPROM on boot up) ?

@cpwilson
Copy link

No problems at all. I simulated 'real life' usage as if I was at the field with powering on, arming the FC then disarming it an powering off, all via the flight pack. Did that a few times and had a couple of USB connections to it as well to check config still there.
It wasn't until it was last powered off and left for 40 mins that when powered on I had a wiped config.

So in answer to the short power on/power off cycles question I would say my shortest power cycle was possibly 2-3 mins.

@MartinHugh
Copy link

No problems at all. I simulated 'real life' usage as if I was at the field with powering on, arming the FC then disarming it an powering off, all via the flight pack. Did that a few times and had a couple of USB connections to it as well to check config still there. It wasn't until it was last powered off and left for 40 mins that when powered on I had a wiped config.

So in answer to the short power on/power off cycles question I would say my shortest power cycle was possibly 2-3 mins.

@cpwilson, just a couple of other things to put the results in context if that is OK?

Did you arm the aircraft
Did you fly the aircraft
Do you have autolevel permanently enabled in the configuration.

Many thanks.

@tipoman9
Copy link

After upgrading from 3.0.2 to 5.0.0 this same issue started to happen to me also. Really annoying.
Board is MatekF405SE.
My other INAV 5.0.0 with OmnibusF4Pro does not seem to have this problem...

@cpwilson
Copy link

No problems at all. I simulated 'real life' usage as if I was at the field with powering on, arming the FC then disarming it an powering off, all via the flight pack. Did that a few times and had a couple of USB connections to it as well to check config still there. It wasn't until it was last powered off and left for 40 mins that when powered on I had a wiped config.
So in answer to the short power on/power off cycles question I would say my shortest power cycle was possibly 2-3 mins.

@cpwilson, just a couple of other things to put the results in context if that is OK?

Did you arm the aircraft Did you fly the aircraft Do you have autolevel permanently enabled in the configuration.

Many thanks.

Did you arm the aircraft
Yes, FC was armed with enough sats etc as it I was to fly it

Did you fly the aircraft
No, only bench tested it, but did cycle through my modes, acro, horizon etc to check they all worked

Do you have autolevel permanently enabled in the configuration.
If you mean servo autotrim, then yes it's always enabled, 'feature -FW_AUTOTRIM'

@0crap
Copy link
Contributor

0crap commented Jul 23, 2022

Can you try without servo autotrim? (Recommended for everyone running into this issue.)
Autotrim can write to EEPROM and maybe related to the issue.
Since you did not fly the craft I don't think it's your root cause, but give it a try anyway.
Thx.

@MartinHugh
Copy link

No problems at all. I simulated 'real life' usage as if I was at the field with powering on, arming the FC then disarming it an powering off, all via the flight pack. Did that a few times and had a couple of USB connections to it as well to check config still there. It wasn't until it was last powered off and left for 40 mins that when powered on I had a wiped config.
So in answer to the short power on/power off cycles question I would say my shortest power cycle was possibly 2-3 mins.

@cpwilson, just a couple of other things to put the results in context if that is OK?
Did you arm the aircraft Did you fly the aircraft Do you have autolevel permanently enabled in the configuration.
Many thanks.

Did you arm the aircraft Yes, FC was armed with enough sats etc as it I was to fly it

Did you fly the aircraft No, only bench tested it, but did cycle through my modes, acro, horizon etc to check they all worked

Do you have autolevel permanently enabled in the configuration. If you mean servo autotrim, then yes it's always enabled, 'feature -FW_AUTOTRIM'

@cpwilson thank you for the info, and sorry, yes I meant autotrim.

@MartinHugh
Copy link

Can you try without servo autotrim? (Recommended for everyone running into this issue.) Autotrim can write to EEPROM and maybe related to the issue. Since you did not fly the craft I don't think it's your root cause, but give it a try anyway. Thx.

Can anyone clarify when autotrim is written, I thought is was only written to EEPROM on disarm.

@0crap
Copy link
Contributor

0crap commented Jul 23, 2022

Can anyone clarify when autotrim is written, I thought is was only written to EEPROM on disarm.

Correct.

@viplexa
Copy link

viplexa commented Jul 24, 2022

Hello everyone, in general, I can repeat this problem forever, I attach a video, I don't save anything, I just connect and disconnect the usb and the configurator several times and after a few attempts the settings are cleared.

Matek F405SE
INAV 5.0.0

Desktop.2022.07.25.-.01.04.13.01.mp4

@cpwilson
Copy link

Can you try without servo autotrim? (Recommended for everyone running into this issue.) Autotrim can write to EEPROM and maybe related to the issue. Since you did not fly the craft I don't think it's your root cause, but give it a try anyway. Thx.

Can anyone clarify when autotrim is written, I thought is was only written to EEPROM on disarm.

OK so with AUTOTRIM disabled I managed about 10 power cycles with arming the FC with no issues.
Left for 2hrs and it was still OK :) with several more arm/disarm cycles.
Left overnight and plugged up this morning and config gone :(

@MartinHugh
Copy link

MartinHugh commented Jul 25, 2022

Can you try without servo autotrim? (Recommended for everyone running into this issue.) Autotrim can write to EEPROM and maybe related to the issue. Since you did not fly the craft I don't think it's your root cause, but give it a try anyway. Thx.

Can anyone clarify when autotrim is written, I thought is was only written to EEPROM on disarm.

OK so with AUTOTRIM disabled I managed about 10 power cycles with arming the FC with no issues. Left for 2hrs and it was still OK :) with several more arm/disarm cycles. Left overnight and plugged up this morning and config gone :(

So even if you did pull the battery immediately after disarming, we know it was not down to the autotrim save.

The next question is, does anything else get written to EEPROM when the aircraft is disarmed ?

It seems to me that although the chances of autotrim causing a config wipe at the field are very small (perhaps if pilot disarms just before a battery-ejecting crash), the chances of it causing a config wipe on the bench are relatively high. For that reason alone, I think autotrim should only be written when the pilot saves explicitly using the sticks.

@0crap
Copy link
Contributor

0crap commented Jul 25, 2022

On v5.0.0 yes, that will be fixed in v5.1.0 with PR #8216

@0crap
Copy link
Contributor

0crap commented Jul 25, 2022

For that reason alone, I think autotrim should only be written when the pilot saves explicitly using the sticks.

Agreed.

@tipoman9
Copy link

I've discovered the cause. You need to unplug and plug quickly and it happens.
I'm 100% sure. I've plugged in the plane today, checked my OSD and saw "no RC link" message - I had forgotten to turn on the TX. Since ELRS needs the TX running when the RX is turned on, my only option was to quickly reset the latter, which requires a quick disconnect-reconnect. And after that my customized OSD changed to the default one, no serve response, etc.

@breadoven
Copy link
Collaborator

breadoven commented Aug 24, 2022

Think I just suffered this for the first time ... and not on a Matek FC, FLYWOOF411in this case.

I was connected to Configurator whilst powered from the flight battery. Disconnected battery power then disconnected a few seconds later from Configurator I think by pulling out the USB connector without disconnecting from Configurator properly (done this many times before though without problems). Can't think of any reason the FC would have been talking with Configurator at the time it was disconnected, don't use any of the Auto trim stuff.

Only recent change was an update from the master just before this happened (last master update before that was a couple of weeks ago).

Very strange.

@ishay320
Copy link

I had it 2 times on wingFC on 5.0.0, trying now on 5.1.0

@ahmadhassan11
Copy link

ahmadhassan11 commented Oct 11, 2022 via email

@P-I-Engineer
Copy link
Contributor

P-I-Engineer commented Oct 11, 2022 via email

@b14ckyy
Copy link
Collaborator

b14ckyy commented Oct 11, 2022

@P-I-Engineer Nope it trims the servos after the Mixer level so the trim is actually used Everywhere.
Trimmed servos release the Integral value of the PID controller to have less work to do, when rate setpoints are 0.

@krasen1234
Copy link

Still not fixed, just happened on a Speedybee 405 mini and inav 7.1.2

@b14ckyy
Copy link
Collaborator

b14ckyy commented Jan 16, 2025

@krasen1234
This ticket is over 2 years closed now.
Please open a proper new issue ticket with all the necessary info and steps you did when it happened.

@alexrjohnston
Copy link

alexrjohnston commented Jan 31, 2025

This just happened to me! Matek F405 TE mini - unplugged power then powered on again quickly and it reset the FC to factory settings iNav 8.0

@sensei-hacker
Copy link
Collaborator

This just happened to me! Matek F405 TE mini - unplugged power then powered on again quickly and it reset the FC to factory settings iNav 8.0

Please see the comment just above yours.

Also you might read any of the other comments, where it's explained that if you yank the battery power while the settings are being written, then yep you'll have corrupted settings. Half old settings, half new, which is invalid so the settings are cleared.

@iNavFlight iNavFlight locked as resolved and limited conversation to collaborators Jan 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests