Skip to content
Open
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
58 changes: 58 additions & 0 deletions docs/boards/MicoAir743-Lite-and-V3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# MicoAir743-Lite and MicoAir743v3

The manufacturer manuals include connector diagrams and MCU pin assignments.

- [MicoAir743-Lite manual](https://micoair.com/en/docs/flight-controller/micoair743/micoair743-lite-flight-controller-manual)
- [MicoAir743v3 manual](https://micoair.com/en/docs/flight-controller/micoair743/micoair743v3-flight-controller)

Both boards use an STM32H743 and an SPA06 barometer. Blackbox logs to microSD by default.

| Target | Board | IMU | Compass | Analog OSD | DroneCAN |
| --- | --- | --- | --- | --- | --- |
| `MICOAIR743LITE` | MicoAir743-Lite | ICM45686 | External, I2C1 | None | — |
| `MICOAIR743V3` | MicoAir743v3 | BMI088 or ICM45686 | Onboard IST8310, I2C2 | AT7456E | CAN1 |
| `MICOAIR743V3_EXTMAG` | MicoAir743v3 | BMI088 or ICM45686 | External, I2C1 | AT7456E | CAN1 |

On V3, `gyro_to_use = 0` selects the BMI088 and `gyro_to_use = 1` selects the ICM45686. Save and reboot after changing it, then calibrate the selected accelerometer and verify the model orientation. With the EXTMAG target, set the external compass alignment for its mounting orientation.

## Default ports

The UART numbers match the board markings.

| Port | Default INAV function | Connection |
| --- | --- | --- |
| USB | MSP | USB Type-C, Configurator |
| UART1 | MSP, 115200 baud | TX1/RX1 |
| UART2 | MSP DisplayPort OSD | Digital VTX connector |
| UART3 | GPS | GPS connector, TX3/RX3 |
| UART4 | Unassigned | TX4/RX4 |
| UART5 | Unassigned (Lite only) | Lite TX5/RX5 |
| UART6 | Serial receiver, SBUS | TX6/RX6 |
| UART7 | ESC telemetry | RX7 only |
| UART8 | MSP, 115200 baud | Internal Bluetooth module |

For CRSF/ELRS, select the corresponding serial receiver protocol and connect receiver TX to RX6 and receiver RX to TX6. On V3, the DJI-VTX and receiver connectors share RX6. Connect only one receiver output to this signal.

On V3, the VTX (Analog) and DJI-VTX connectors share TX2. Choose either DisplayPort or analog VTX serial control for UART2.

## Outputs and LED strip

| Timer | Lite outputs | V3 outputs |
| --- | --- | --- |
| TIM1 | M1–M4 | M1–M4 |
| TIM3 | M5–M8 | M5–M6 |
| TIM15 | M9–M10 | M9–M10 |
| TIM4 | M11–M12 and the LED/PWM15 pad | M7–M8 and the LED/PWM11 pad |
| TIM12 | M13–M14 | — |

M10 is PWM-only on both boards. M13 and M14 are also PWM-only on Lite. Outputs on the same timer need compatible protocols and rates, so use PWM for the M9/M10 timer group when M10 is required.

`LED_STRIP` is disabled by default. Enabling it reserves TIM4, making Lite M11/M12 or V3 M7/M8 unavailable for motor/servo outputs. Keep it disabled when those outputs are needed. The buzzer uses a separate GPIO and does not reserve this timer.

Motor and servo assignment depends on the selected mixer and timer output modes. Check each physical output against the Configurator assignment before use.

## V3 camera and VTX power

The VTX (Analog), DJI-VTX, and FPV Camera connectors share a switched 9 V supply. With default settings and main power connected, the supply starts ON.

To control this supply, assign an AUX range to USER1 (PINIO1) in the Modes tab. **Activating USER1 turns the 9 V supply off for all three connectors, including the camera. Deactivating USER1 restores power.**
1 change: 1 addition & 0 deletions src/main/target/MICOAIR743LITE/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target_stm32h743xi(MICOAIR743LITE)
28 changes: 28 additions & 0 deletions src/main/target/MICOAIR743LITE/config.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* This file is part of INAV.
*
* INAV is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* INAV is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with INAV. If not, see <http://www.gnu.org/licenses/>.
*/

#include "platform.h"

#include "io/serial.h"

void targetConfiguration(void)
{
serialFindPortConfiguration(SERIAL_PORT_USART2)->functionMask = FUNCTION_MSP_OSD;
serialFindPortConfiguration(SERIAL_PORT_USART3)->functionMask = FUNCTION_GPS;
serialFindPortConfiguration(SERIAL_PORT_USART7)->functionMask = FUNCTION_ESCSERIAL;
serialFindPortConfiguration(SERIAL_PORT_USART8)->functionMask = FUNCTION_MSP; // Bluetooth
}
48 changes: 48 additions & 0 deletions src/main/target/MICOAIR743LITE/target.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* This file is part of INAV.
*
* INAV is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* INAV is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with INAV. If not, see <http://www.gnu.org/licenses/>.
*/

#include <stdint.h>

#include "platform.h"

#include "drivers/bus.h"
#include "drivers/io.h"
#include "drivers/pwm_mapping.h"
#include "drivers/sensor.h"
#include "drivers/timer.h"

BUSDEV_REGISTER_SPI(busdev_icm45686, DEVHW_ICM45686, ICM45686_SPI_BUS, ICM45686_CS_PIN, ICM45686_EXTI_PIN, DEVFLAGS_NONE, IMU_ICM45686_ALIGN);

timerHardware_t timerHardware[] = {
DEF_TIM(TIM1, CH4, PE14, TIM_USE_OUTPUT_AUTO, 0, 0), // M1
DEF_TIM(TIM1, CH3, PE13, TIM_USE_OUTPUT_AUTO, 0, 1), // M2
DEF_TIM(TIM1, CH2, PE11, TIM_USE_OUTPUT_AUTO, 0, 2), // M3
DEF_TIM(TIM1, CH1, PE9, TIM_USE_OUTPUT_AUTO, 0, 3), // M4
DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 4), // M5
DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 5), // M6
DEF_TIM(TIM3, CH2, PA7, TIM_USE_OUTPUT_AUTO, 0, 6), // M7
DEF_TIM(TIM3, CH1, PA6, TIM_USE_OUTPUT_AUTO, 0, 7), // M8
DEF_TIM(TIM15, CH1, PE5, TIM_USE_OUTPUT_AUTO, 0, 13), // M9
DEF_TIM(TIM15, CH2, PE6, TIM_USE_OUTPUT_AUTO, 0, 0), // M10: PWM only
DEF_TIM(TIM4, CH1, PD12, TIM_USE_OUTPUT_AUTO, 0, 10), // M11
DEF_TIM(TIM4, CH2, PD13, TIM_USE_OUTPUT_AUTO, 0, 11), // M12
DEF_TIM(TIM12, CH1, PB14, TIM_USE_OUTPUT_AUTO, 0, 0), // M13: PWM only
DEF_TIM(TIM12, CH2, PB15, TIM_USE_OUTPUT_AUTO, 0, 0), // M14: PWM only
DEF_TIM(TIM4, CH3, PD14, TIM_USE_LED, 0, 9), // LED pad
};

const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
126 changes: 126 additions & 0 deletions src/main/target/MICOAIR743LITE/target.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
/*
* This file is part of INAV.
*
* INAV is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* INAV is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with INAV. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#define TARGET_BOARD_IDENTIFIER "M7LT"
#define USBD_PRODUCT_STRING "MICOAIR743LITE"
#define VBUS_SENSING_PIN PA8

#define LED0 PE3
#define LED1 PE4
#define LED2 PE2

#define USE_LED_STRIP
#define WS2811_PIN PD14
#define BEEPER PD15
#define BEEPER_INVERTED

// The Lite has one IMU and no SPI OSD chip.
#define USE_SPI
#define USE_SPI_DEVICE_3
#define SPI3_SCK_PIN PB3
#define SPI3_MISO_PIN PB4
#define SPI3_MOSI_PIN PD6
#define USE_IMU_ICM45686
#define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
#define ICM45686_SPI_BUS BUS_SPI3
#define ICM45686_CS_PIN PD4
#define ICM45686_EXTI_PIN PD5
#define IMU_ICM45686_ALIGN CW90_DEG

#define USE_I2C
#define USE_I2C_DEVICE_1
#define I2C1_SCL PB8
#define I2C1_SDA PB9
#define USE_I2C_DEVICE_2
#define I2C2_SCL PB10
#define I2C2_SDA PB11

// SPA06 is polled over the internal bus; external sensors use I2C1.
#define USE_BARO
#define USE_BARO_DPS310
#define DPS310_I2C_BUS BUS_I2C2
#define DPS310_I2C_ADDR 0x77
#define DEFAULT_I2C_BUS BUS_I2C1
#define USE_MAG
#define USE_MAG_ALL
#define MAG_I2C_BUS DEFAULT_I2C_BUS

#define USE_VCP
#define USE_UART1
#define UART1_TX_PIN PA9
#define UART1_RX_PIN PA10
#define USE_UART2
#define UART2_TX_PIN PA2
#define UART2_RX_PIN PA3
#define USE_UART3
#define UART3_TX_PIN PD8
#define UART3_RX_PIN PD9
#define USE_UART4
#define UART4_TX_PIN PA0
#define UART4_RX_PIN PA1
#define USE_UART5
#define UART5_TX_PIN PB6
#define UART5_RX_PIN PB5
#define USE_UART6
#define UART6_TX_PIN PC6
#define UART6_RX_PIN PC7
#define USE_UART7
#define UART7_RX_PIN PE7 // ESC telemetry; TX is not connected.
#define USE_UART8
#define UART8_TX_PIN PE1
#define UART8_RX_PIN PE0
#define SERIAL_PORT_COUNT 9

#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
#define SERIALRX_PROVIDER SERIALRX_SBUS
#define SERIALRX_UART SERIAL_PORT_USART6

#define USE_SDCARD
#define USE_SDCARD_SDIO
#define SDCARD_SDIO_DEVICE SDIODEV_1
#define SDCARD_SDIO_4BIT
#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT

#define USE_ADC
#define ADC_INSTANCE ADC1
#define ADC_CHANNEL_1_PIN PC0
#define ADC_CHANNEL_2_PIN PC1
#define VBAT_ADC_CHANNEL ADC_CHN_1
#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
#define VBAT_SCALE_DEFAULT 2112
#define CURRENT_METER_SCALE 249 // 40.2 A/V expressed in 0.1 mV/A

#define USE_RANGEFINDER
#define USE_RANGEFINDER_MSP
#define USE_OPFLOW
#define USE_OPFLOW_MSP

// Leave the optional LED strip disabled so TIM4 is available for M11/M12.
#define DEFAULT_FEATURES (FEATURE_VBAT | FEATURE_CURRENT_METER | FEATURE_OSD | FEATURE_TELEMETRY)
#define USE_DSHOT
#define USE_ESC_SENSOR
#define USE_SERIAL_4WAY_BLHELI_INTERFACE

#define TARGET_IO_PORTA 0xffff
#define TARGET_IO_PORTB 0xffff
#define TARGET_IO_PORTC 0xffff
#define TARGET_IO_PORTD 0xffff
#define TARGET_IO_PORTE 0xffff

#define MAX_PWM_OUTPUT_PORTS 14
2 changes: 2 additions & 0 deletions src/main/target/MICOAIR743V3/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
target_stm32h743xi(MICOAIR743V3)
target_stm32h743xi(MICOAIR743V3_EXTMAG)
39 changes: 39 additions & 0 deletions src/main/target/MICOAIR743V3/config.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* This file is part of INAV.
*
* INAV is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* INAV is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with INAV. If not, see <http://www.gnu.org/licenses/>.
*/

#include <stdint.h>
#include "platform.h"

#include "fc/fc_msp_box.h"
#include "io/piniobox.h"
#include "io/serial.h"
#include "sensors/compass.h"

void targetConfiguration(void)
{
#ifndef MICOAIR743V3_EXTMAG
compassConfigMutable()->mag_align = CW90_DEG;
#endif

// Use identifiers: V3 has no UART5, unlike MICOAIR743V2.
serialFindPortConfiguration(SERIAL_PORT_USART2)->functionMask = FUNCTION_MSP_OSD;
serialFindPortConfiguration(SERIAL_PORT_USART3)->functionMask = FUNCTION_GPS;
serialFindPortConfiguration(SERIAL_PORT_USART7)->functionMask = FUNCTION_ESCSERIAL;
serialFindPortConfiguration(SERIAL_PORT_USART8)->functionMask = FUNCTION_MSP; // Bluetooth

pinioBoxConfigMutable()->permanentId[0] = BOX_PERMANENT_ID_USER1; // VTX power control
}
49 changes: 49 additions & 0 deletions src/main/target/MICOAIR743V3/target.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* This file is part of INAV.
*
* INAV is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* INAV is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with INAV. If not, see <http://www.gnu.org/licenses/>.
*/

#include <stdint.h>

#include "platform.h"

#include "drivers/bus.h"
#include "drivers/io.h"
#include "drivers/pwm_mapping.h"
#include "drivers/sensor.h"
#include "drivers/timer.h"

// BMI088 accelerometer and gyro must use the same selection tag.
BUSDEV_REGISTER_SPI_TAG(busdev_bmi088_gyro, DEVHW_BMI088_GYRO, BMI088_SPI_BUS, BMI088_GYRO_CS_PIN, BMI088_GYRO_EXTI_PIN, 0, DEVFLAGS_NONE, IMU_BMI088_ALIGN);
BUSDEV_REGISTER_SPI_TAG(busdev_bmi088_acc, DEVHW_BMI088_ACC, BMI088_SPI_BUS, BMI088_ACC_CS_PIN, BMI088_ACC_EXTI_PIN, 0, DEVFLAGS_NONE, IMU_BMI088_ALIGN);
BUSDEV_REGISTER_SPI_TAG(busdev_icm45686, DEVHW_ICM45686, ICM45686_SPI_BUS, ICM45686_CS_PIN, ICM45686_EXTI_PIN, 1, DEVFLAGS_NONE, IMU_ICM45686_ALIGN);

timerHardware_t timerHardware[] = {
DEF_TIM(TIM1, CH4, PE14, TIM_USE_OUTPUT_AUTO, 0, 0), // M1
DEF_TIM(TIM1, CH3, PE13, TIM_USE_OUTPUT_AUTO, 0, 1), // M2
DEF_TIM(TIM1, CH2, PE11, TIM_USE_OUTPUT_AUTO, 0, 2), // M3
DEF_TIM(TIM1, CH1, PE9, TIM_USE_OUTPUT_AUTO, 0, 3), // M4
DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 4), // M5
DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 5), // M6
DEF_TIM(TIM4, CH1, PD12, TIM_USE_OUTPUT_AUTO, 0, 6), // M7
DEF_TIM(TIM4, CH2, PD13, TIM_USE_OUTPUT_AUTO, 0, 7), // M8
DEF_TIM(TIM15, CH1, PE5, TIM_USE_OUTPUT_AUTO, 0, 13), // M9: DMA2 Stream5, independent of M1
DEF_TIM(TIM15, CH2, PE6, TIM_USE_OUTPUT_AUTO, 0, 0), // M10: PWM only (no channel DMA)

DEF_TIM(TIM4, CH3, PD14, TIM_USE_LED, 0, 9), // LED strip, or an extra output when LED_STRIP is disabled
// PD15 remains a GPIO beeper and must not be claimed as a TIM4 output.
};

const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
Loading
Loading