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

Mf407 v 3.5.7 #26353

Closed
wants to merge 4 commits into from
Closed
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
38 changes: 38 additions & 0 deletions 123456
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn
NhAAAAAwEAAQAAAYEAx4oqjx1LCKu5SZ9ma00Dc/xT3vN+9qLrbauYe+nnEefcD1tqOg78
qRcWXScW5K+T/53YY6g6Tm5q/x8E4TSZaKJPxfi8yH6BxrCsfFiKiaSLRF1lT8OkD9edch
Vxx8aWbUeQDda3/ffjb2DwkN1YkTwVnI4nXxwoPqq/UL7Kg8XGm+RNUZE83UKLN/MwYWom
05On1AxweMF87Bh3gF0UfTE5mSJI/8lcb5cfzsH+J8wuSmQtfmdzg6Ys7fgCtVCN3bcK7u
ypX6kbXzO3VIZ8nQ7ZV0Ku3tt3bwmp9b7esBsm5puNHEk6m1xrmwcJfBM06Q5W5IVbdW78
vn9UchhByHfM6OxOyAZxk6Exb3ZukudlMGOEt9Zq6okRG+lkyw3LNA24q0LLf/cISKaMnF
LdveuOcOZ2Vf1BF4l9afIOUuDDDgTM8Um40cSAZJ40GX5nvmkYummaj8IBDojauK+EyEaD
hcl5TbSvcq5P8f/XtjVQWUidy7RVSSxSHp0RSrifAAAFkDM/86ozP/OqAAAAB3NzaC1yc2
EAAAGBAMeKKo8dSwiruUmfZmtNA3P8U97zfvai622rmHvp5xHn3A9bajoO/KkXFl0nFuSv
k/+d2GOoOk5uav8fBOE0mWi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X/T0m8vY7eV8KlQ5NEOBhrR0TBQgm
qnILtzkFcj7sIXhmOyzldBDjRYrjY/05UhgoNzne+AGRvrt1YP9PJ6nb5MCiwfYJhpU9Nw
2MDM5TPF7E5EijEoEaZrRKDpe7oy9iZ46Vzvk5HGkPtMXHCXkAAADBAPAnrJT4pnWads2k
40Hn7C88Q4Y6xj1htn1beCCarr7qk+5EO+1NcMs11VMvmKlbYGGTwjtVycWz76d2TVK9pI
PPp3PHXQnk22HCsvO040E6gckyeNypmB+WBOBoPS0nsRRmId39NsEyydnvPxTK+jIfzgbb
LCLSNWXR2pjRoZhe9kHdB/meKOy7TQDYlujyy/FwvGQ8JqaE6Huqox1qKk8UicROIYjKMS
cIG+88sUodajnP3vkG9M+kU3QugIQfDwAAAMEA1LR7YV13W99M/7gHvnnfM6md0YaW3T3N
ZlaJxkX4xQLMTIcvWjrCYtkpkMbwf56HBExPxgQN9hAY2wqUNqNyu6BFuILTEPfufEoZSD
Dd/VQautz/UbP5ybZ4v8+CHCuyFDq5QLg1eqE18IZZEp+aAmpTEbY1Z0i7TMTIm1WF40Aq
8I1edBRVu3nU2+PsdWIuko91L2PZvN2ldTdrmj1C4xKAI4DkwYkWQLWE3VCy8YSEqlvEF8
SKS9aepXM0Rs1xAAAAFDk0SU5AREVTS1RPUC1QSjgwVTNKAQIDBAUG
-----END OPENSSH PRIVATE KEY-----
1 change: 1 addition & 0 deletions 123456.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDHiiqPHUsIq7lJn2ZrTQNz/FPe8372outtq5h76ecR59wPW2o6DvypFxZdJxbkr5P/ndhjqDpObmr/HwThNJlook/F+LzIfoHGsKx8WIqJpItEXWVPw6QP151yFXHHxpZtR5AN1rf99+NvYPCQ3ViRPBWcjidfHCg+qr9QvsqDxcab5E1RkTzdQos38zBhaibTk6fUDHB4wXzsGHeAXRR9MTmZIkj/yVxvlx/Owf4nzC5KZC1+Z3ODpizt+AK1UI3dtwru7KlfqRtfM7dUhnydDtlXQq7e23dvCan1vt6wGybmm40cSTqbXGubBwl8EzTpDlbkhVt1bvy+f1RyGEHId8zo7E7IBnGToTFvdm6S52UwY4S31mrqiREb6WTLDcs0DbirQst/9whIpoycUt29645w5nZV/UEXiX1p8g5S4MMOBMzxSbjRxIBknjQZfme+aRi6aZqPwgEOiNq4r4TIRoOFyXlNtK9yrk/x/9e2NVBZSJ3LtFVJLFIenRFKuJ8= 94IN@DESKTOP-PJ80U3J
38 changes: 38 additions & 0 deletions ardupilot
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn
NhAAAAAwEAAQAAAYEAx2OS8A9DCW3tsdA5u/6opuTwOiZzFILpUpXn3uUUA5M7KK6W/VgD
ImmT+rk3LKQ/N5JLAKVRWlACA+OLhVRN1hCDusjPqrwahF6nDZeomTip9uHt/pFGgqYDAn
dly03IGlGOYpVeGjUpuk8bH5Hh++dpM8MF7t9Ho3EBzZ4YtlrS9vk7GxtLpEFLJF+YlYeh
8FCHVTVkYhRfVWVIb6GFIMAtcj2bkFwwS1zyTLJDlTXt/7pCKpgjXoYkB8qA+OBB0RGrwv
P+2II+TnFyUgCfcYTBcoZ1RpLxgoNmy5VSiX+tBjyfpn3e1T3UOwgfp3gpa02ITrojRILM
z+u9u47a4mUQGWVIvwhCmblTCz06w4tClFyRVxe0bKGeRQeyqPdU0sX5yRnHk9Sr4mIiPE
wfNbDAeMyD2QT/IQZhllED7p/t8OiLjN+EdaaXZfNbWWJq8XItCveVB4KuPAdYYtHExhr/
ibDRrmlTRn8XevQF1JUZnfhSN/DH+YxxKGOBl/arAAAFkOKtTsvirU7LAAAAB3NzaC1yc2
EAAAGBAMdjkvAPQwlt7bHQObv+qKbk8DomcxSC6VKV597lFAOTOyiulv1YAyJpk/q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Iv
BbePG3lBal/XJc7Drp6IsMFtKBtMvkPFP/VQgR2GHzYQAseTgu8M15JmqHDV1Xqwctbbp6
Ve/tGeEpJe3iXSdCTCa1QhQzkhQpqKJpoEYvkwsheZ+h6HqNpL0lBvMg2Q2oxdjfqq6Wac
aeUM4XZNO5EZI0ik44aUx1qsy5ODw0v6w+RqRYhZaKnAMnnAAAAMEA8n2ZGjHtj1gnqQtk
Cz7iIs8aHsOhhZtXDnzH1HtTRBawxM0UUJ6N/zxRoxFTm6hSlJBk4Mw8n9B0YtXL/ML/QH
HTAb+BVm9RHaWa2Mq0y6uMHIJ5fdBIzx0Vas3Ndqc9JDslYa4Flwva8jP1aMCHbsuYfYIE
sBh7ocxtbEp7+Afh9MS7dEgNzjiqfvjnnhNAYlhYZIhZKMnnDB4WP2NyXLlLvPBEVHMFBp
a10dKbrjdrV94HvWTE+PUbRbnj+T6nAAAAwQDSf0KMqRMAa/6XL+oJVCM88dGaaQBfChwF
0GfZgzJfbDi2KnonACJoLXU8Aq55iHe06WcvnCMjKkqzvISl6q+nxzBDcr0q0yemuhw7N1
DIbZBwG+6u9yfNwbTqwR24c9VCoTNkt2SjRhDa8pt9t0uzeXnlgR/p/93s/o8Q8XZ6yitJ
4PzcrNMhzNFTgygjyockLPDCyNSi+qJPqe69ySN1QPhdotn2fyu7HkAURMbEUqc+WwPl63
8JdvnLSMjsrF0AAAAUOTRJTkBERVNLVE9QLVBKODBVM0oBAgMEBQYH
-----END OPENSSH PRIVATE KEY-----
1 change: 1 addition & 0 deletions ardupilot.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDHY5LwD0MJbe2x0Dm7/qim5PA6JnMUgulSlefe5RQDkzsorpb9WAMiaZP6uTcspD83kksApVFaUAID44uFVE3WEIO6yM+qvBqEXqcNl6iZOKn24e3+kUaCpgMCd2XLTcgaUY5ilV4aNSm6TxsfkeH752kzwwXu30ejcQHNnhi2WtL2+TsbG0ukQUskX5iVh6HwUIdVNWRiFF9VZUhvoYUgwC1yPZuQXDBLXPJMskOVNe3/ukIqmCNehiQHyoD44EHREavC8/7Ygj5OcXJSAJ9xhMFyhnVGkvGCg2bLlVKJf60GPJ+mfd7VPdQ7CB+neClrTYhOuiNEgszP6727jtriZRAZZUi/CEKZuVMLPTrDi0KUXJFXF7RsoZ5FB7Ko91TSxfnJGceT1KviYiI8TB81sMB4zIPZBP8hBmGWUQPun+3w6IuM34R1ppdl81tZYmrxci0K95UHgq48B1hi0cTGGv+JsNGuaVNGfxd69AXUlRmd+FI38Mf5jHEoY4GX9qs= 94IN@DESKTOP-PJ80U3J
165 changes: 165 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/mf407/matekf407.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
# hw definition file for MatekF405 hardware
# tested on the MatekF405-OSD board
# with thanks to betaflight for pinout


# MCU class and specific type
MCU STM32F4xx STM32F407xx

# board ID for firmware load
APJ_BOARD_ID 125

# crystal frequency
OSCILLATOR_HZ 8000000

define STM32_ST_USE_TIMER 4
define CH_CFG_ST_RESOLUTION 16

FLASH_SIZE_KB 1024


# only one I2C bus
I2C_ORDER I2C1

# order of UARTs (and USB)
SERIAL_ORDER OTG1 USART3 UART4 USART1 UART5 USART2

# LEDs
PB9 LED_BLUE OUTPUT LOW GPIO(0)
PA14 LED_GREEN OUTPUT LOW GPIO(1)

define HAL_GPIO_A_LED_PIN 0
define HAL_GPIO_B_LED_PIN 1

# buzzer
PC13 BUZZER OUTPUT GPIO(80) LOW
define HAL_BUZZER_PIN 80



# spi1 bus for IMU
PA5 SPI1_SCK SPI1
PA6 SPI1_MISO SPI1
PA7 SPI1_MOSI SPI1

# spi2 for OSD
# PB13 SPI2_SCK SPI2
# PB14 SPI2_MISO SPI2
# PB15 SPI2_MOSI SPI2
# PB10 MAX7456_CS CS

# spi3 for sdcard and onboard flash
PB3 SPI3_SCK SPI3
PB4 SPI3_MISO SPI3
PB5 SPI3_MOSI SPI3
PC1 SDCARD_CS CS
PC0 M25P16_CS CS

PC2 MPU9250_CS CS

# only one I2C bus in normal config
PB6 I2C1_SCL I2C1
PB7 I2C1_SDA I2C1

# analog pins
PC5 BATT_VOLTAGE_SENS ADC1 SCALE(1)
PC4 BATT_CURRENT_SENS ADC1 SCALE(1)
PB1 RSSI_ADC_PIN ADC1 SCALE(1)

# define default battery setup
# PC5 - ADC12_CH15
define HAL_BATT_VOLT_PIN 15
# PC4 - ADC12_CH14
define HAL_BATT_CURR_PIN 14
define HAL_BATT_VOLT_SCALE 10.1
define HAL_BATT_CURR_SCALE 17.0

#analog rssi pin (also could be used as analog airspeed input)
# PB1 - ADC12_CH9
define BOARD_RSSI_ANA_PIN 9

# USART1
PA9 USART1_TX USART1
PA10 USART1_RX USART1

# RC input using timer
PA3 TIM9_CH2 TIM9 RCININT PULLDOWN

# alternative RC input using UART
PA2 USART2_TX USART2 NODMA
PA3 USART2_RX USART2 NODMA ALT(1)

# USART3
PC10 USART3_TX USART3
PC11 USART3_RX USART3

# UART4
PA0 UART4_TX UART4
PA1 UART4_RX UART4

# UART5
PD2 UART5_RX UART5
PC12 UART5_TX UART5

# PA10 IO-debug-console
PA11 OTG_FS_DM OTG1
PA12 OTG_FS_DP OTG1

# USB detection
PB12 VBUS INPUT OPENDRAIN

# debug (disabled out to allow for both LEDs)
#PA13 JTMS-SWDIO SWD
#PA14 JTCK-SWCLK SWD

# PWM out pins. Note that channel order follows the ArduPilot motor
# order conventions
PC6 TIM3_CH1 TIM3 PWM(1) GPIO(50)
PC7 TIM8_CH2 TIM8 PWM(2) GPIO(51)
PC8 TIM8_CH3 TIM8 PWM(3) GPIO(52)
PC9 TIM8_CH4 TIM8 PWM(4) GPIO(53)
PA15 TIM2_CH1 TIM2 PWM(5) GPIO(54)
PA8 TIM1_CH1 TIM1 PWM(6) GPIO(55)

define HAL_STORAGE_SIZE 15360
STORAGE_FLASH_PAGE 2

# reserve 32k for bootloader and 32k for flash storage
FLASH_RESERVE_START_KB 64

# one IMU
IMU Invensense SPI:mpu9250 ROTATION_YAW_180

# probe for I2C BMP280, but allow init on board variants without onboard baro too
BARO BMP280 I2C:0:0x76
define HAL_BARO_ALLOW_INIT_NO_BARO
define AP_BARO_BACKEND_DEFAULT_ENABLED 0
define AP_BARO_BMP280_ENABLED 1

# no built-in compass, but probe the i2c bus for all possible
# external compass types
define ALLOW_ARM_NO_COMPASS
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
define HAL_I2C_INTERNAL_MASK 0
define HAL_COMPASS_AUTO_ROT_DEFAULT 2

# SPI devices
SPIDEV mpu9250 SPI1 DEVID1 MPU9250_CS MODE3 4*MHZ 8*MHZ
SPIDEV sdcard SPI3 DEVID1 SDCARD_CS MODE0 400*KHZ 25*MHZ
# SPIDEV osd SPI2 DEVID1 MAX7456_CS MODE0 10*MHZ 10*MHZ

# filesystem setup on sdcard
define HAL_OS_FATFS_IO 1

# setup for OSD
define OSD_ENABLED 1
define HAL_OSD_TYPE_DEFAULT 1
ROMFS_WILDCARD libraries/AP_OSD/fonts/font0.bin

# disable parachute and sprayer to save flash
define HAL_PARACHUTE_ENABLED 0
define HAL_SPRAYER_ENABLED 0

# save some flash
include ../include/save_some_flash.inc
include ../include/minimize_fpv_osd.inc
37 changes: 37 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/mf407/matekf407_bl.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# hw definition file for processing by chibios_pins.py
# for minimal F405 bootloader

# MCU class and specific type
MCU STM32F4xx STM32F407xx

# board ID for firmware load
APJ_BOARD_ID 125

# crystal frequency
OSCILLATOR_HZ 8000000

FLASH_SIZE_KB 1024

# bootloader is installed at zero offset
FLASH_RESERVE_START_KB 0

# LEDs
PB9 LED_BOOTLOADER OUTPUT LOW
PA14 LED_ACTIVITY OUTPUT LOW
define HAL_LED_ON 0

# the location where the bootloader will put the firmware
FLASH_BOOTLOADER_LOAD_KB 64


# order of UARTs
SERIAL_ORDER OTG1

PA11 OTG_FS_DM OTG1
PA12 OTG_FS_DP OTG1

# Add CS pins to ensure they are high in bootloader
# PB10 MAX7456_CS CS
PC1 SDCARD_CS CS
PC0 M25P16_CS CS
PC2 MPU9250_CS CS
1 change: 1 addition & 0 deletions v3.5.7.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This branch is used to generate custom code for ArduCopter 3.5.7 firmware
Loading