Skip to content

Commit

Permalink
Merge pull request #2954 from alexeystn/matekf405_servos
Browse files Browse the repository at this point in the history
Move servo from S1 to S6 pin for MATEKF405
  • Loading branch information
stronnag authored Apr 4, 2018
2 parents 15862e8 + fa82a8f commit 6a3ea09
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 57 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ endif

GROUP_1_TARGETS := AIRHEROF3 AIRHEROF3_QUAD COLIBRI_RACE LUX_RACE SPARKY REVO SPARKY2 COLIBRI FALCORE PIKOBLX
GROUP_2_TARGETS := SPRACINGF3 SPRACINGF3EVO SPRACINGF3EVO_1SS SPRACINGF3MINI SPRACINGF3NEO SPRACINGF4EVO
GROUP_3_TARGETS := OMNIBUS AIRBOTF4 BLUEJAYF4 OMNIBUSF4 OMNIBUSF4PRO OMNIBUSF4V3 SPARKY2 MATEKF405 OMNIBUSF7 DYSF4PRO MATEKF405OSD
GROUP_3_TARGETS := OMNIBUS AIRBOTF4 BLUEJAYF4 OMNIBUSF4 OMNIBUSF4PRO OMNIBUSF4V3 SPARKY2 MATEKF405 OMNIBUSF7 DYSF4PRO MATEKF405OSD MATEKF405_SERVOS6
GROUP_4_TARGETS := ANYFC ANYFCF7 ANYFCF7_EXTERNAL_BARO ANYFCM7 ALIENFLIGHTNGF7 PIXRACER
GROUP_OTHER_TARGETS := $(filter-out $(GROUP_1_TARGETS) $(GROUP_2_TARGETS) $(GROUP_3_TARGETS) $(GROUP_4_TARGETS), $(VALID_TARGETS))

Expand Down
98 changes: 45 additions & 53 deletions docs/Board - MatekF405.md
Original file line number Diff line number Diff line change
@@ -1,88 +1,83 @@

# Board - MATEKSYS F405 family

## Matek F405-OSD

![Matek F405-OSD](http://www.mateksys.com/downloads/FC/MATEKF405-OSD.JPG)
![Matek F405-AIO](http://www.mateksys.com/wp-content/uploads/2017/06/F405-AIO_2.jpg)

## Matek F405-AIO
### Matek F405-CTR
http://www.mateksys.com/?portfolio=f405-ctr

![Matek F405-AIO](http://www.mateksys.com/wp-content/uploads/2017/06/F405-AIO_2.jpg)
### Matek F405-STD
http://www.mateksys.com/?portfolio=f405-std

## Description
F405+ICM20602, w/ Betaflight OSD & SD Card Slot
### Matek F405-AIO (end-of-life)
http://www.mateksys.com/?portfolio=f405-aio

F405-AIO (only) exposes I2C pads for compass / baro etc.
### Matek F405-OSD (end-of-life)
http://www.mateksys.com/?portfolio=f405-osd

## Firmware

Due to differences on the board (I2C --- see below), there are two
firmware variants:
Due to differences on the board (I2C - see below), there are two firmware variants:

| Board | Firmware |
| ------ | -------- |
| Matek F405-AIO | inav_x.y.z_MATEKF405.hex |
| Matek F405-AIO, STD, CTR | inav_x.y.z_MATEKF405.hex<br/>inav_x.y.z_MATEKF405_SERVOS6.hex |
| Matek F405-OSD | inav_x.y.z_MATEKF405OSD.hex |

## MCU, Sensors and Features
## Hardware features

### Hardware
* MCU: STM32F405RGT6
* IMU: ICM-20602(SPI)
* MCU: STM32F405RGT6, 168MHz
* IMU: ICM-20602 (OSD, AIO, STD), MPU6000 (CTR)
* OSD: BetaFlight OSD w/ AT7456E chip
* Compass & Baro: no
* VCP: Yes
* Hardware UARTS: 1, 2, 3, 4, 5
* Blackbox: Micro SD Card
* PPM/UART Shared: UART2-RX
* Battery Voltage Sensor: Yes
* Current Sensor: F405-AIO, otherwise FCHUB-6S option
* Integrated Voltage Regulator: F405-AIO, otherwise FCHUB-6S option
* Brushed Motor Mosfets: No
* Buttons: BOOT button
* 6 PWM / DSHOT capable outputs
* WS2812 Led Strip : Yes
* Beeper : Yes

### Features
* 32K Gyro ICM-20602
* Support Gyro sample rate 32K & PID Loop 16K
* Baro: BMP280 (STD, CTR)
* Compass: No
* Blackbox: MicroSD card slot
* VCP, UART1, UART2, UART3, UART4, UART5
* Built in inverter for SBUS input (UART2-RX)
* 6x DSHOT capable outputs without conflict (iNav does not implement DSHOT)
* SD Card Slot
* VCP, UART1, UART2, UART3, UART4 & UART5
* w/ Anti-vibration Standoffs
* Dedicated hardware I2C on F405-AIO, soft-I2C via USART3 on F405-OSD
* PPM/UART Shared: UART2-RX
* Battery Voltage Sensor
* I2C SDA & SCL: Yes
* LDO: 3.3V Max. 300mA
* Current Sensor: Yes (AIO, CTR), otherwise FCHUB-6S option
* Integrated Power Distribution Board: Yes (AIO, CTR), otherwise FCHUB-6S option
* Integrated Voltage Regulator: 5V 2A & 9V 2A (AIO), 5V 2A (CTR), otherwise FCHUB-6S option
* 6 PWM / DSHOT capable outputs (iNav does not implement DSHOT)
* WS2812 Led Strip : Yes
* Beeper: Yes
* RSSI: Yes
* Side-press button for BOOT(DFU) mode
* Anti-vibration Standoffs

### I2C

The F405-AIO board exposes dedicated I2C pads.

The F405-AIO, STD, CTR boards expose dedicated I2C pads.
The F405-OSD does not expose I2C. For iNav there is a software I2C provision using the USART3 pads, as:

* SDA => RX3, SCL => TX3
* Do not assign any serial function to USART3

## PWM and Servos
### PWM and Servos

Due to the available hardware, please note:

### Flying Wing
#### Flying Wing

* S1 : ESC
* S2 : LEFT elevon
* S3 : RIGHT elevon

### Tricopter
#### Tricopter

* S1 : Tail Servo
* S2 : Motor 1
* S3 : Motor 2
* S4 : Motor 3

If you need servo connected to S6 pin while keeping motors on S1..S4 pins (e.g. camera tilt on quadcopter), please flash MATEKF405_SERVOS6 firmware.

I2C requires that the WS2812 led strip is moved to S5, thus WS2812 is not usable on hexcopter and similar.

## USB
### USB

This board uses STM32 VCP and does _not_ use a UART when USB is connected. STM32 VCP drivers might be required on some operating systems.

Expand All @@ -96,21 +91,18 @@ ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", ENV{ID_MM_DEVICE_IGNORE}="1"

On Windows, it may be necessary to use the [Zadig](http://zadig.akeo.ie) tool to install the WinUSB driver.

## Manufacturers and Distributors
Matek Systems http://www.mateksys.com/?portfolio=f405-osd and http://www.mateksys.com/?portfolio=f405-aio

## Designers
Matek Systems www.mateksys.com
## Manufacturer

## Maintainers
* Hardware: Matek Systems
Matek Systems: http://www.mateksys.com/

## FAQ & Known Issues
## Distributors

Setup Guide Matek F405: http://f405.mateksys.com
http://www.mateksys.com/?page_id=1212

Setup Guide Matek F405-AIO: http://www.mateksys.com/?portfolio=f405-aio
## FAQ & Known Issues

Rcgroups Thread Matek F405: https://www.rcgroups.com/forums/showthread.php?2889298-MATEKSYS-Flight-Controller-F405-OSD-32K-Gyro-5xUARTs-SD-Slot

Rcgroups Thread Matek F405-AIO: https://www.rcgroups.com/forums/showthread.php?2912273-Matek-Flight-Controller-F405-AIO


Empty file.
14 changes: 11 additions & 3 deletions src/main/target/MATEKF405/target.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,22 @@
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
{ TIM9, IO_TAG(PA3), TIM_Channel_2, 0, IOCFG_AF_PP_PD, GPIO_AF_TIM9, TIM_USE_PPM },

{ TIM3, IO_TAG(PC6), TIM_Channel_1, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM3, TIM_USE_MC_MOTOR | TIM_USE_MC_SERVO | TIM_USE_FW_MOTOR }, //S1 DMA1_ST4 MT1
#ifdef MATEKF405_SERVOS6
{ TIM3, IO_TAG(PC6), TIM_Channel_1, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM3, TIM_USE_MC_MOTOR | TIM_USE_FW_MOTOR }, //S1 DMA1_ST4 MT1
#else
{ TIM3, IO_TAG(PC6), TIM_Channel_1, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM3, TIM_USE_MC_MOTOR | TIM_USE_MC_SERVO | TIM_USE_FW_MOTOR },
#endif
{ TIM8, IO_TAG(PC7), TIM_Channel_2, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM8, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO }, //S2 DMA2_ST3 SV3
{ TIM8, IO_TAG(PC8), TIM_Channel_3, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM8, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO }, //S3 DMA2_ST4 SV4
{ TIM8, IO_TAG(PC9), TIM_Channel_4, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM8, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO }, //S4 DMA3_ST7 SV5

{ TIM2, IO_TAG(PA15), TIM_Channel_1, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM2, TIM_USE_MC_MOTOR | TIM_USE_LED | TIM_USE_FW_SERVO }, //S5 DMA1_ST5 2812LED

{ TIM1, IO_TAG(PA8), TIM_Channel_1, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM1, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO }, //S6 DMA2_ST6 SV6

#ifdef MATEKF405_SERVOS6
{ TIM1, IO_TAG(PA8), TIM_Channel_1, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM1, TIM_USE_MC_MOTOR | TIM_USE_MC_SERVO | TIM_USE_FW_SERVO }, //S6 DMA2_ST6 SV6
#else
{ TIM1, IO_TAG(PA8), TIM_Channel_1, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM1, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO },
#endif
{ TIM4, IO_TAG(PB8), TIM_Channel_3, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM4, TIM_USE_MC_CHNFW | TIM_USE_FW_MOTOR }, //S7 DMA1_ST7 MT2

{ TIM5, IO_TAG(PA2), TIM_Channel_3, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM5, TIM_USE_PWM }, //TX2
Expand Down

0 comments on commit 6a3ea09

Please sign in to comment.