Hello,
I am trying to port ArduPilot to my own custom flight controller based on the STM32H743VIT6, using MicoAir743 as the closest reference board.
My board hardware is:
-
MCU: STM32H743VIT6
-
HSE: 8 MHz
-
USB FS: PA11/PA12
-
LEDs:
-
PE4 = BLUE
-
PE5 = RED
-
PE6 = GREEN
-
Sensor connections:
-
SPI bus:
-
PD3 = SCK
-
PC3 = MOSI
-
PC2 = MISO
-
-
IMUs:
-
BMI088 accel CS = PD4
-
BMI088 gyro CS = PD5
-
BMI270 CS = PA15
-
-
I2C bus:
-
PB10 = SCL
-
PB11 = SDA
-
-
I2C sensors:
-
LPS22HH barometer
-
LSM303AGR accel/mag
-
I created custom hwdef.dat and hwdef-bl.dat for my board and built ArduPilot for it.
My problem is:
-
in some builds the board boots and connects to Mission Planner,
-
but RAW_IMU stays at zero,
-
AHRS shows error_rp = 1,
-
roll/pitch/yaw do not react,
-
and barometer detection also seems broken.
In Mission Planner, RAW_IMU.xacc/yacc/zacc/xgyro/ygyro/zgyro remain 0 all the time.
What makes this confusing is that I wrote a separate bare-metal sensor test firmware for the same board, and in that test:
-
BMI088 responds correctly,
-
BMI270 responds,
-
LSM303AGR responds,
-
movement changes the IMU readings,
-
compass changes are also detected.
So the hardware and sensor wiring seem to be correct.
I also noticed that a previously downloaded MicoAir743 arducopter_with_bl.hex appears to be from ArduCopter 4.6.3, while my local builds from current master are 4.8.0-dev, and the generated .hex files differ a lot. Because of that, I am not sure whether I am dealing with:
-
a hwdef mistake,
-
a sensor driver/init issue,
-
a difference between 4.6.3 and current master,
-
or some board-specific detail in MicoAir743 that I missed.
My questions are:
-
If the sensors work in bare-metal code, what is the most likely reason for RAW_IMU = 0 in ArduPilot?
-
Is there anything for BMI088/BMI270 on H743 boards that must be configured beyond hwdef.dat / hwdef-bl.dat?
-
Could a barometer or compass init failure prevent the IMU from becoming usable?
-
Would it be better to start from a minimal BMI088-only config first and add the other sensors later?
-
Is there any known-good example for a custom H743 board very close to MicoAir743?
If needed, I can also post my hwdef.dat, hwdef-bl.dat, and exact sensor pin mapping.
Thanks in advance.
If you want, I can also make a shorter, more “forum-style” version, or a more technical one with the exact hwdef lines included.