Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BACKPORT] px4_fmu-v6c:Add Mini & fix Rev 1 #21227

Merged
merged 1 commit into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion boards/px4/fmu-v6c/src/board_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,13 @@
#define HW_INFO_INIT_VER 3 /* Offset in above string of the VER */
#define HW_INFO_INIT_REV 4 /* Offset in above string of the REV */

#define BOARD_NUM_SPI_CFG_HW_VERSIONS 2 // Rev 0, 10 Sensor sets
#define BOARD_NUM_SPI_CFG_HW_VERSIONS 3 // Rev 0, 10 and Mini Sensor sets
// Base/FMUM
#define V6C00 HW_VER_REV(0x0,0x0) // FMUV6C, Rev 0 I2C4 External but with Internal devices
#define V6C01 HW_VER_REV(0x0,0x1) // FMUV6C, Rev 1 I2C4 Internal I2C2 External
#define V6C10 HW_VER_REV(0x1,0x0) // NO PX4IO, Rev 0 I2C4 External but with Internal devices
#define V6C11 HW_VER_REV(0x1,0x1) // NO PX4IO, Rev 1 I2C4 Internal I2C2 External
#define V6C21 HW_VER_REV(0x2,0x1) // FMUV6CMini, Rev 1 I2C4 Internal I2C2 External


/* HEATER
Expand Down
6 changes: 6 additions & 0 deletions boards/px4/fmu-v6c/src/manifest.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ static const px4_hw_mft_item_t hw_mft_list_v0600[] = {
.mandatory = 1,
.connection = px4_hw_con_onboard,
},
{
.present = 1,
.mandatory = 1,
.connection = px4_hw_con_onboard,
},
};

static const px4_hw_mft_item_t hw_mft_list_v0610[] = {
Expand All @@ -101,6 +106,7 @@ static px4_hw_mft_list_entry_t mft_lists[] = {
{V6C01, hw_mft_list_v0600, arraySize(hw_mft_list_v0600)}, // Rev 1
{V6C10, hw_mft_list_v0610, arraySize(hw_mft_list_v0610)}, // Rev 0 No PX4IO
{V6C11, hw_mft_list_v0610, arraySize(hw_mft_list_v0610)}, // Rev 1 No PX4IO
{V6C21, hw_mft_list_v0600, arraySize(hw_mft_list_v0600)}, // Rev 1 MINI
};

/************************************************************************************
Expand Down
12 changes: 11 additions & 1 deletion boards/px4/fmu-v6c/src/spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,17 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortD, GPIO::Pin4})
}),
}),
initSPIHWVersion(V6C10, {
initSPIHWVersion(V6C01, {
initSPIBus(SPI::Bus::SPI1, {
initSPIDevice(DRV_GYR_DEVTYPE_BMI055, SPI::CS{GPIO::PortC, GPIO::Pin14}, SPI::DRDY{GPIO::PortE, GPIO::Pin5}),
initSPIDevice(DRV_ACC_DEVTYPE_BMI055, SPI::CS{GPIO::PortC, GPIO::Pin15}, SPI::DRDY{GPIO::PortE, GPIO::Pin4}),
initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P, SPI::CS{GPIO::PortC, GPIO::Pin13}, SPI::DRDY{GPIO::PortE, GPIO::Pin6}),
}, {GPIO::PortB, GPIO::Pin2}),
initSPIBus(SPI::Bus::SPI2, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortD, GPIO::Pin4})
}),
}),
initSPIHWVersion(V6C21, {
initSPIBus(SPI::Bus::SPI1, {
initSPIDevice(DRV_GYR_DEVTYPE_BMI055, SPI::CS{GPIO::PortC, GPIO::Pin14}, SPI::DRDY{GPIO::PortE, GPIO::Pin5}),
initSPIDevice(DRV_ACC_DEVTYPE_BMI055, SPI::CS{GPIO::PortC, GPIO::Pin15}, SPI::DRDY{GPIO::PortE, GPIO::Pin4}),
Expand Down