Branches:
- branch master - for cg023 quad - also starting point for other boards
- branch syma x5s-r - for syma x5hw board , pids not tuned
This is an alternate firmware for the Eachine CG023 quadcopter. It is a port of the Eachine H8 firmware, also by me ( silverxxx).
The quadcopter is based around the STM32F031 chip, Cortex M0 processor with 16K flash memory.
Compile using MDK-ARM toolchain aka Keil uVision. A special version is available for stm32F0xx devices ( full free version ), but it's not necessary since the 32K limit of the free version is above the cpu's 16K. STM32 support may need to be installed using the "pack installer"
Opening the project file in Keil will also ask to install the pack if not present.
Current options are stock cg023 transmitter ,H8 mini transmitter / devo, CX-10 (later "blue" variant) and H7. Protocol is by default H8 mini protocol, and can be changed in file config.h
Move the pitch stick down 3 times within about 2 seconds. Needs to be done on a level surface. Saved so it only needs to be done once. You may need to use high rates in order to reach the treshold.
- rates have been integrated into protocol file, and depend on protocol abilities
- the quadcopter rate ( in deg/sec) is no longer multiplied by 2, so it's the actual rate with devo.
- acro only version can be compiled by enabling respective setting in config.h
- LEVEL_MAX_RATE is now a hardware limit and does not affect pid kp and ki
The STM32 port ( this firmware ) is designed to be configurable in order to be adaptable to other boards.Hardware configuration settings are found in file hardware.h . Right now, only xn297 radio and invensense gyro (sometimes marked M5xx or M6xx) are supported. Pwm pins can be set to PA0 - PA11 , PB0 , PB1. Radio SPI and gyro I2C can be set to any PAx or PBx pins.
The gcc version compiles close to 16k, and may need turning off features in order to make it fit. Read install.md for additional information.
Currently this port is covered by the it's own thread on rcgroups. http://www.rcgroups.com/forums/showthread.php?t=2634611#post34381034
http://sirdomsen.diskstation.me/dokuwiki/doku.php?id=start
- features for syma x5hw boards ( pb8 pwm etc)
- bk2453 radio support
- syma protocol ( x5c ) - tested with devo only
- oneshot42 for esc driver
- devo telemetry suport for bayang protocol ( default)
- auto vdrop calculation added
- High angle update (level mode works up to 90 degrees)
- added less flicker lights when dimmed
- MIX_LOWER_THROTTLE added from h8 gd32
- //#define MIX_INCREASE_THROTTLE spelling fix
- added bluetooth beacon functionality
- software i2c optimizations (speed/size)
- added hw i2c, it can work at full speed in some cases where softi2c needs a slowdown
- pins PB6 and PB7 by default for hw i2c
- removed cpu speed dependancies in pwm and systimer routines
- added overclock option to 64Mhz from 48
- added serial support (tx) on SWCLK pin
- added osd output using LTM protocol
- changed delay() so it's actually close to what it's supposed to be
- added esc driver
- pwm frequency now works to 185Hz
- default protocol changed to H8mini
- added extra pwm pins from H8 port( A4,A6,A7,B0,B1 )
- i2c speed setting from D1 port
- GPIOF pins can now be used
- added motor curves
- exp optimization merged from user stawel
- added CX-10 (blue) protocol
- adc input fix
- added invsqrt to imu (from quake)
- merged gcc support by Paweł Stawicki
- merged H7 protocol support by Paweł Stawicki
- fixed bug setting motor to PA11
- added automatic flips
- flash saving optimization
- flash saving optimizations
- headless fixed in both modes
- pwm frequency can be set now
- moved pin setting to hardware.h
- level pid limit change ( LEVEL_MAX_RATE now acts as hardware limit)
- added pwm defines
- i2c speed improvement
- some optimizations, etc
- dual mode added
- added alternate led "battery low 2" ( 3.3V )
- CG023 stock tx protocol added