Baro: Unable to initialize driver issue

Im making my own flight controller using a Nucleo H743 and ive modelled the components after the KakuteH7. It uses the hwdef of KakuteH7 too. Everything works so far (Motors/ESC, RC, IMU) but for the baro I keep getting endless loop of:

29/01/2024 15:16:08 : Config Error: Baro: unable to initialise driver
29/01/2024 15:16:07 : Config Error: fix problem then reboot
29/01/2024 15:16:03 : Config Error: Baro: unable to initialise driver
29/01/2024 15:16:02 : Config Error: fix problem then reboot
29/01/2024 15:15:58 : Config Error: Baro: unable to initialise driver

Im using a BMP280 (same as KakuteH7) from amazon (board name is GY280). Supplying it with 3.3v from the Nucleo and have pulled SDO pin to VCC which switches to the address i2c 0x76 (Part of the boards design). I can confirm the baro works as I have connected it to an arduino and am reading from values from it fine.

According to the KakuteH7’s hwdef, the I2C pins are PB6 (SCL) and PB6 (SDA) of which I double checked they are connected to the board right.

I dont know why it is not reading the baro, could this be a firmware/param issue?

I also noticed in the HW ID tab that only the IMU has an ID. I have no clue about this setting or if it means anything but wanted to include in case its relevant as there are no values for the Baros

Not a firmware issue unless you’ve modified the driver.

Your sensor isn’t detected, meaning it’s more likely a wiring issue (or that cheap barometer doesn’t behave like a genuine chip). What’s the default address of a genuine BMP280? Maybe that’s the issue.

I hooked up the very same baro to an Arduino and was able to read values from it fine. Ive double checked the wiring too and its connected to the right pins.

That happens when the sensor is not detected. The address appears correct. I can only assume that you have it wired to the wrong pins or that the clone barometer that you’re using doesn’t conform with the genuine hardware spec.

The BMP280 is commonly used, and the AP driver is very simple. It works fine on my genuine KakuteH7.

Im considering buying a genuine adafruit BMP280 module now. My confusion is that Im actually using the adafruit library to read the BMP280 with arduino and so surely if it works for this cheaper module, surely AP’s driver should also work

All I can tell you is that it’s a known working configuration and that the following wiring scheme is correct:

# I2C1 for baro
PB6 I2C1_SCL I2C1
PB7 I2C1_SDA I2C1

Make sure you have power and ground properly connected as well.

Could I get away with disabling the Baro? My drone is a heavy (6kg) and is not designed for fast movement but has a heavy focus on stabilization and attitude control.

Perhaps you can learn something here. Baro at least is recognized.
Nucleo H7

You won’t be using anything other than stabilize and acro modes with a disabled barometer. And if that’s your use case, I’d suggest you use Betaflight.

If you can’t get a basic I2C device working, you’ll likely run into compass and other peripheral issues as well.

I gave up with trying to get bmp280 sensors working, I tried 4 and couldn’t get any working with a flight controller, I would recommend a MS5611, it worked first time for me.

https://ardupilot.org/copter/docs/common-baro-external.html

I fixed it. The 3.3v source to the Baro was faulty. Got a working 3.3v and it now connects and calibrates.