Skip to content

AP_Baro: read data from BMP581 twice, reject if not identical#32171

Merged
peterbarker merged 2 commits intoArduPilot:masterfrom
peterbarker:pr/bmp581-read-twice
Apr 13, 2026
Merged

AP_Baro: read data from BMP581 twice, reject if not identical#32171
peterbarker merged 2 commits intoArduPilot:masterfrom
peterbarker:pr/bmp581-read-twice

Conversation

@peterbarker
Copy link
Copy Markdown
Contributor

reports of corruption on this device

needs testing on real hardware; hardware may not permit double-reading of data registers.

@peterbarker
Copy link
Copy Markdown
Contributor Author

Closes #31935

@peterbarker peterbarker force-pushed the pr/bmp581-read-twice branch from 5436ac5 to 2a54a8b Compare March 6, 2026 04:08
@vincentpoont2
Copy link
Copy Markdown
Contributor

Hi @peterbarker, Tested on hardware.
I think this can merge after changing the BMP581 barometer I2C bus from I2C4 to I2C0 to align with hardware bus configuration.

@vincentpoont2
Copy link
Copy Markdown
Contributor

vincentpoont2 commented Apr 8, 2026

Hi @peterbarker , can we make the change above and merge this?

@peterbarker peterbarker force-pushed the pr/bmp581-read-twice branch from 2a54a8b to a80843c Compare April 9, 2026 01:46
@peterbarker
Copy link
Copy Markdown
Contributor Author

Hi @peterbarker , can we make the change above and merge this?

I have adjusted the hwdef - please verify it's correct.

@vincentpoont2
Copy link
Copy Markdown
Contributor

Hi @peterbarker , can we make the change above and merge this?

I have adjusted the hwdef - please verify it's correct.

@zebulon-86 Please double check.


# barometers (Holybro 6X more recent versions)
BARO BMP581 I2C:2:0x46
BARO BMP581 I2C:0:0x47
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For newer Holybro 6X hardware (RC02), the BMP581 on I2C:0 uses address 0x46 rather than 0x47. This should be updated to:

# barometers (Holybro 6X more recent versions)
BARO BMP581 I2C:2:0x46
BARO BMP581 I2C:0:0x46

@zebulon-86
Copy link
Copy Markdown
Contributor

I also validated this on three RC02 Holybro 6X boards with long-duration tests of 2.2h, 8.9h, and 2.3h. No abnormal barometer data jumps were observed during any of these runs.

Based on these results, the BMP581 driver changes in this PR appear to be working correctly on RC02 hardware as well.

Representative log screenshots are attached below.

image image image

Copy link
Copy Markdown
Contributor

@vincentpoont2 vincentpoont2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For newer Holybro 6X hardware (RC02), the BMP581 on I2C:0 uses address 0x46 rather than 0x47.

Comment thread libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef.dat Outdated
@peterbarker peterbarker force-pushed the pr/bmp581-read-twice branch from f967e72 to 201807d Compare April 13, 2026 03:04
@peterbarker peterbarker merged commit 40529b9 into ArduPilot:master Apr 13, 2026
109 checks passed
@peterbarker
Copy link
Copy Markdown
Contributor Author

Merging as discussed on call

@peterbarker peterbarker deleted the pr/bmp581-read-twice branch April 14, 2026 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Pending

Development

Successfully merging this pull request may close these issues.

3 participants