ardupilot
ardupilot copied to clipboard
FFT is not started/calibrated if LOG_DISARMED,1 on ArduPlane-stable 4.2.1
Bug report
Issue details
Changing only the following params from default:
FFT_ENABLE,1
FFT_MINHZ,20
FFT_MAXHZ,400
INS_HNTCH_ENABLE,1
INS_HNTCH_MODE,4
INS_HNTCH_REF,1
FFT_WINDOW_SIZE,64
RPM1_TYPE,4
I get a message like this AP: FFT: calibrated 1.0KHz/7.8Hz/93.8Hz on startup and harmonic rpm works fine
If I enable LOG_DISARMED,1 FFT is not started, and rpm shows a random constant value.
Version ArduPlane-stable 4.2.1
Platform [ ] All [ ] AntennaTracker [ ] Copter [ x ] Plane [ ] Rover [ ] Submarine
Hardware type Pixhawk1
I can confirm the LOG_DISARMED,1 bug can be reproduced on Pixhawk5x too.
I've done the following, to make sure nothing else is interfering:
- Create fft.param file with the following content:
FFT_ENABLE,1
FFT_MINHZ,20
FFT_MAXHZ,400
INS_HNTCH_ENABLE,1
INS_HNTCH_MODE,4
INS_HNTCH_REF,1
FFT_WINDOW_SIZE,64
RPM1_TYPE,4
-
Build and upload on ArduPlane-stable branch
$ ./waf distclean && git submodule update --init --recursive && ./waf configure --default-parameters=fft.param --disable-scripting --board=Pixhawk5X && ./waf -p plane --upload -
After flashing, using mavproxy, do
param set FORMAT_VERSION 0to reset eeeprom.
Make sure a formatted SDcard is inserted.
-
Calibrate accels and reboot
-
Do a reboot, check for the following message:
AP: FFT: calibrated 2.0KHz/15.7Hz/200.0Hz
reboot, multiple time, you'll find similar message at each boot normally
-
Do
param set LOG_DISARMED 1then reboot.. fft is not calibrated on startup any more. You can try multiple reboots too. -
Again
param set LOG_DISARMED 0then reboot, fft is calibrated normally again.
I actually found a more serious problem Pixhawk5X too. The reboot command after activating LOG_DISARMED,1 following the mentioned steps, does not work fine, I've to do a power cycle..
@Jaaaky I still cannot reproduce this in my environment following your instructions - it all works fine, I definitely think it is memory/RAM related
@andyp1per Have you seen my update on Pixhawk5x it has free mem of over 180KBs at least as seen on mavproxy while reproducing the bug? The board has 512kb of ram Which board you've tested?
I'm sure it's not a ram issue.
@Jaaaky I reproduced, and the issue is the board was failing another arming check in ins_checks() if you get it to pass all other arming checks then FFT should init @andyp1per we really should move FFT init out of arming checks
@tridge this is a different issue
@Jaaaky did you get past this problem? Do you know if it still a problem on more recent versions?
@peterbarker Yes, this issue still exists on Stable branch - currently arduplane 4.2.3 -, it's not on master.
Also, another issue which was reported against master about fft rpm not working, now also exists on ArduPlane-stable 4.2.3 https://github.com/ArduPilot/ardupilot/issues/20898
@peterbarker Also, with ARMING_REQUIRE,0 FFY is not started/calibrated on boot too, even with LOG_BACKEND_TYPE,0 and accelerometers are calibrated. Confirmed on master and stable
@andyp1per Please check here too. They're all related
@Jaaaky they are all different issues