The processor cannot keep up with the main loop
What ArduPilot says:
- PreArm: Main loop slow (NHz < NHz)
ArduPilot runs its control loop SCHED_LOOP_RATE times a second: 400 for Copter, 50 for Plane by default. The message gives the rate it really reaches and the rate asked for; arming is refused when the first is under 90% of the second. A loop that runs late means late motor commands.
What to do, most likely first
More is switched on than this processor can run at that rate.
CheckOlder F4 and small F7 boards are the usual case. The first number in the message shows how far behind it is.
FixSwitch off what you do not use: the gyro FFT (
FFT_ENABLE), Lua scripts (SCR_ENABLE), a second or third EKF core (EK3_IMU_MASK), fast logging options inLOG_BITMASK. Reboot and read the message again.SCHED_LOOP_RATEorINS_GYRO_RATEwas raised beyond what the board can do.FixGo back to the defaults (
SCHED_LOOP_RATE400 on a copter,INS_GYRO_RATE0) and reboot; raise them again only on an H7 board.The firmware was built for another, faster board variant, or with extra features.
CheckThe Firmware Inspector shows which board and features a firmware file was built for.
FixLoad the stable firmware made for your exact board.
Parameters to look at
| Parameter | What it is |
|---|---|
SCHED_LOOP_RATE | Scheduling main loop rate |
INS_GYRO_RATE | Gyro rate for IMUs with Fast Sampling enabled |
FFT_ENABLE | Enable |
SCR_ENABLE | Enable Scripting |
EK3_IMU_MASK | Bitmask of active IMUs |
LOG_BITMASK | Log bitmask |
The code that sends it
PreArm: Main loop slow (NHz < NHz)
libraries/AP_Arming/AP_Arming.cpp AP_Arming::system_checks() · Open in ArduPilot Copter-4.7.1