diff --git a/libraries/AP_HAL_ChibiOS/hwdef/FlywooF405S-AIO/README.md b/libraries/AP_HAL_ChibiOS/hwdef/FlywooF405S-AIO/README.md new file mode 100644 index 00000000000000..9c1005ade2e251 --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/FlywooF405S-AIO/README.md @@ -0,0 +1,103 @@ +# GOKU F405 1-2S 12A AIO w/ built-in ELRS 2.4g RX + +https://flywoo.net/collections/aio-evo-stacks-combo/products/goku-versatile-f405-2s-12a-aio-w-build-in-elrs-2-4g-rx-mpu6000 + +The Flywoo GOKU F405 AIO is a flight controller produced by [Flywoo](https://flywoo.net/). + +## Features + +- MCU: STM32F405 32-bit processor. 1024Kbytes Flash +- IMU: MPU6000 (SPI) +- Barometer: BMP280 +- Onboard LED:WS2812*2 +- USB VCP Driver (all UARTs usable simultaneously; USB does not take up a UART) +- 6 hardware UARTS (UART1,2,3,4,5,6) +- Built-in ELRS 2.4Ghz serial receiver +- Also supports external serial receivers (SBUS, iBus, Spektrum, Crossfire) +- Onbord 8Mbytes for Blackbox logging +- 5V Power Out: 2.0A max +- Dimensions: 30x30mm +- Mounting Holes: Standard 25.5/26.5mm square to center of holes +- Weight: 8.5g + +- Built-in 12A BLHeli_S 4in1 ESC +- Supports BLheli_S / BlueJay / J-ESC +- Supports Oneshot125, Oneshot42, Multishot, Dshot150, Dshot300, Dshot600 +- Input Voltage: 1-2S Lipo +- Continuous Current: 12A +- Firmware: Z_H_30_REV16.7 + +## Pinout + +![GOKU F405 12A AIO](GOKUF405AIO_Pinout.png "GOKU F405 12A AIO") + +## UART Mapping + +The UARTs are marked Rn and Tn in the above pinouts. The Rn pin is the +receive pin for UARTn. The Tn pin is the transmit pin for UARTn. +|Name|Pin|Function| +|:-|:-|:-| +|SERIAL0|COMPUTER|USB| +|SERIAL1|RX1/TX1|USART1 (ELRS, DMA-enabled)| +|SERIAL2|TX2/RX2|USART2 (GPS, DMA on RX)| +|SERIAL3|TX3/RX3|USART3 (RC Input/Output, DMA-enabled)| +|SERIAL4|TX4/RX4|UART4 (TELEM)| +|SERIAL5|TX5/RX5|UART5| +|SERIAL6|TX6/RX6|UART6 (VTX)| + +USART1 and USART3 supports RX and TX DMA. UART4 supports TX DMA. USART2 supports RX DMA. UART5 and UART6 do not support DMA. + +## RC Input + +RC input is configured on UART1 or UART3, which supports serial RC protocols. This board does not support PPM. + +## OSD Support + +The GOKU F405 AIO supports OSD using OSD_TYPE 1 (MAX7456 driver). + +## PWM Output + +The GOKU F405 AIO supports up to 5 PWM outputs. The pads for motor output ESC1 to ESC4 on the above diagram are the first 4 outputs.All 5 outputs support DShot. + +The PWM are in 3 groups: + +PWM 1-2: Group 1 +PWM 3-4: Group 2 +LED: Group 3 + +Channels within the same group need to use the same output rate. If +any channel in a group uses DShot then all channels in the group need +to use DShot. PWM 1-4 support bidirectional dshot. + +## Battery Monitoring + +The board has a builtin voltage sensor. The voltage sensor can handle 2S to 6S +LiPo batteries. + +The correct battery setting parameters are: + + - BATT_MONITOR 4 + - BATT_VOLT_PIN 12 + - BATT_VOLT_MULT around 11 + - BATT_CURR_PIN 13 + - BATT_CURR_MULT around 60.2 + +These are set by default in the firmware and shouldn't need to be adjusted + +## Compass + +The GOKU F405 AIO does not have a builtin compass but it does have an external I2C connector. + +## NeoPixel LED + +The board includes a NeoPixel LED pad. + +## Loading Firmware (you will need to compile your own firmware) + +Initial firmware load can be done with DFU by plugging in USB with the +bootloader button pressed. Then you should load the "with_bl.hex" +firmware, using your favourite DFU loading tool. + +Once the initial firmware is loaded you can update the firmware using +any ArduPilot ground station software. Updates should be done with the +*.apj firmware files. diff --git a/libraries/AP_HAL_ChibiOS/hwdef/FlywooF405S-AIO/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/FlywooF405S-AIO/defaults.parm new file mode 100644 index 00000000000000..42accacb9bdf23 --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/FlywooF405S-AIO/defaults.parm @@ -0,0 +1,11 @@ +# setup for LEDs on chan9 +SERVO5_FUNCTION 120 +NTF_LED_TYPES 257 +NTF_LED_LEN 2 +# ESC setup +MOT_PWM_TYPE 6 +SERVO_BLH_AUTO 1 +SERVO_BLH_TRATE 0 +# RC setup +RC_OPTIONS 8704 +SERIAL1_PROTOCOL 23 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/FlywooF405S-AIO/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/FlywooF405S-AIO/hwdef.dat index 0d72ed4b66ee6a..a4f16cce1f8f7e 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/FlywooF405S-AIO/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/FlywooF405S-AIO/hwdef.dat @@ -51,26 +51,28 @@ SERIAL_ORDER OTG1 USART1 USART2 USART3 UART4 UART5 USART6 PA11 OTG_FS_DM OTG1 PA12 OTG_FS_DP OTG1 -# USART1 +# USART1 (ELRS) PA10 USART1_RX USART1 PB6 USART1_TX USART1 +define HAL_SERIAL1_PROTOCOL SerialProtocol_RCIN -# USART2 -PD5 USART2_TX USART2 +# USART2 (GPS) +PD5 USART2_TX USART2 NODMA PD6 USART2_RX USART2 +define HAL_SERIAL2_PROTOCOL SerialProtocol_GPS -# USART3 +# USART3 (RX) PB10 USART3_TX USART3 PB11 USART3_RX USART3 -# UART4 +# UART4 (TELEM) PA0 UART4_TX UART4 -PA1 UART4_RX UART4 +PA1 UART4_RX UART4 NODMA # UART5 PD2 UART5_RX UART5 NODMA -# USART6 +# USART6 (VTX) PC6 USART6_TX USART6 NODMA PC7 USART6_RX USART6 NODMA @@ -97,16 +99,12 @@ define HAL_BATT_MONITOR_DEFAULT 4 # MOTORS PB0 TIM3_CH3 TIM3 PWM(1) GPIO(50) # M1 -PB1 TIM3_CH4 TIM3 PWM(2) GPIO(51) # M2 -PA3 TIM2_CH4 TIM2 PWM(3) GPIO(52) # M3 +PB1 TIM3_CH4 TIM3 PWM(2) GPIO(51) BIDIR # M2 +PA3 TIM2_CH4 TIM2 PWM(3) GPIO(52) BIDIR # M3 PA2 TIM2_CH3 TIM2 PWM(4) GPIO(53) # M4 -PB5 TIM3_CH2 TIM3 PWM(5) GPIO(54) # M5 -PB7 TIM4_CH2 TIM4 PWM(6) GPIO(55) # M6 -PC9 TIM8_CH4 TIM8 PWM(7) GPIO(56) # M7 -PC8 TIM8_CH3 TIM8 PWM(8) GPIO(57) # M8 # LEDs -PA9 TIM1_CH2 TIM1 PWM(9) GPIO(58) # M9 +PA9 TIM1_CH2 TIM1 PWM(5) GPIO(54) # M5 PC14 LED0 OUTPUT LOW GPIO(90) define HAL_GPIO_A_LED_PIN 90 @@ -122,7 +120,7 @@ SPIDEV osd SPI3 DEVID1 OSD1_CS MODE0 10*MHZ 10*MHZ define OSD_ENABLED 1 define HAL_OSD_TYPE_DEFAULT 1 -ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin +ROMFS_WILDCARD libraries/AP_OSD/fonts/font0.bin # Barometer setup BARO BMP280 I2C:0:0x76 @@ -135,8 +133,8 @@ BARO DPS310 I2C:0:0x76 # IMU setup SPIDEV imu1 SPI1 DEVID1 GYRO1_CS MODE3 1*MHZ 8*MHZ IMU Invensense SPI:imu1 ROTATION_YAW_90 -DMA_NOSHARE TIM3_UP TIM2_UP TIM4_UP TIM8_UP SPI1* -DMA_PRIORITY TIM3_UP TIM2_UP TIM4_UP TIM8_UP SPI1* +DMA_NOSHARE SPI1* +DMA_PRIORITY TIM3_UP TIM1_UP SPI1* # no built-in compass, but probe the i2c bus for all possible # external compass types