ArduPilot ESP32 Custom Build - GPS Hold Mode AHRS Error
Hardware Setup:
Flight Controller: ESP32 (Custom Firmware Build)
- IMU: GY-91 (MPU9250 + BMP280) via I2C
- Magnetometer: QMC5883L via I2C
- GPS: HLRC M100 Pro
- Frame: Quadcopter
Pin Configuration:
Motors (PWM): GPIO 33, 25, 32, 26 I2C
(SDA/SCL): GPIO 21, 22
UART0 (TX/RX): GPIO 1, 3
UART1 (TX/RX): GPIO 16, 17
Current Status:
Working:
- All sensors detected and functioning
- STABILIZE mode - flies stable
- ALTITUDE HOLD mode - working correctly
- GPS Lock: 36-37 satellites with 3D Fix
Not Working:
- GPS HOLD/Loiter mode fails to arm
The Problem:
When attempting to arm in GPS Hold/Loiter mode, I get these errors:
Waiting for homePreArm: AHRS: not using configured AHRS type
Parameters I’ve Already Set:
AHRS_EKF_TYPE = 3
EK3_ENABLE = 1
Despite having EKF3 properly configured and excellent GPS lock (36-37 sats), the AHRS error persists.
My Questions:
- Why is AHRS not using the configured EKF3 type even though it’s explicitly set?
- Are there additional EKF3 parameters required for ESP32 custom builds?
- Could this be related to I2C sensor configuration or compass setup?
- Is there something specific about GPS-dependent modes on ESP32 that I’m missing?
Additional Info:
- Firmware: ArduPilot 4.x for ESP32 (custom build)
- Build: Custom pin definitions compiled from source
- Compass calibration: Completed successfully
- Accelerometer calibration: Completed successfully
- Home position: Not being set despite GPS lock