CG023 alternate firmware (acro/level) - RC Groups
Thread Tools
Mar 28, 2016, 07:12 PM
Registered User
Mini-HowTo

CG023 alternate firmware (acro/level)


I ported my firmware for the H8 mini to the cg023, in order to move to the more popular STM32F031 processor, and have a few more board options.

Currently , the firmware has both level and acro mode. Using the stock Tx, it still has 3 rate buttons, and the mode change button, which is the middle button opposite to the rate buttons. A Devo TX can also be used.


Flashing instructions:

Once the board is flashed, the original (factory) firmware cannot be restored.

An ST-LINK v2 is needed for the flashing process.

steps:

Hardware setup:

Connect board's DAT to stlink's SWDIO , board CLK to stlink SWDCLK , and GND to GND (ground) . The pads are on the underside of the board. 4 small screws have to be removed in order to turn the board.

Software setup:

1) Install st-link drivers from http://www.st.com/web/en/catalog/tools/PF260219#

2) Install Keil MDK from http://www2.keil.com/mdk5

3) Install STM32F031 cpu support using the pack installer in Keil uVision. You may skip this.

Alternatively, Keil uVision will also ask to install the pack when the project is open, if not installed. Choose "install", and wait for installation to complete (download).

Flashing process:

Assuming the installation process was performed, the flashing is what erases the old firmware and uploads the new one.

1) download the project folder from http://github.com/silver13/CG023
Unzip to a folder of your choice.

2) open project file "openmicro/openmicro.uvprojx" or similar
Keil uVision may ask to install device support if not present, click "install".

3) compile the project and make sure there are zero errors reported in the lower part of the window. Use either the "build" toolbar icon, menu "project/build target" or "F7" hotkey.

4) connect the st-link and the quadcopter board, and connect a battery to the quad

5) ERASE THE OLD FIRMWARE (once only)
This step will erase the factory firmware. It is not possible to restore.
This only needs to be done once, to clear the "software lock" that is enabled.
Make sure the project compiles without errors as you will need something to upload after erasing.
* select menu Flash/Erase in keil
* a progress bar will indicate the procedure in the status bar of the window( 2-3 seconds)
You may need to disconenct the battery and reconnect it again after this step is complete.

6) upload new firmware to the quad using menu flash/Download, or toolbar icon with text "load" and 2 arrows pointing down.

7) Enjoy your newly flashed quadcopter.

Files:

Firmware source code: https://github.com/silver13/CG023

Other:

wiki: http://sirdomsen.diskstation.me/doku...u.php?id=start

Devo telemetry setup: RCG Post

Other silverware quads:

Boldclash Bwhoop B03 and B03-Pro
Eachine E011
Eachine H8 ( blue board )
Eachine H8S ( same as H101 )
Last edited by silverxxx; Sep 27, 2017 at 10:34 PM.
Sign up now
to remove ads between posts
Mar 28, 2016, 07:12 PM
Registered User
reserved
Mar 29, 2016, 02:59 AM
Registered User
Good to see more alternate firmware, it must be hard to write though.
Mar 29, 2016, 05:09 PM
Registered User
It was not exactly easy, but I wanted something to do...
Mar 29, 2016, 05:18 PM
Registered User
Saijin_Naib's Avatar
Silver, I'm incredibly ignorant about this firmware package other than having seen it mentioned many times on these boards.

What do I have to do to check for possible compatibility with a quad? Read off the chip (if they're not in conformal coating or scraped)?

I'm curious if one of these packages could be used for any of the Dromida line that I like.
Mar 29, 2016, 07:38 PM
Registered User
IKKI's Avatar
Great and thank you
Mar 29, 2016, 11:12 PM
Registered User
Quote:
Originally Posted by Saijin_Naib
Silver, I'm incredibly ignorant about this firmware package other than having seen it mentioned many times on these boards.

What do I have to do to check for possible compatibility with a quad? Read off the chip (if they're not in conformal coating or scraped)?

I'm curious if one of these packages could be used for any of the Dromida line that I like.
The most important thing is the processor, this is intended for the STM32F031 , but it will also work on other F0 series cpus.

Right now it also supports the XN297 radio and some invensense gyros.

This are pretty common chips, and are available in a number of quadcopters, however, they are not always connected on the same pins to the processor, so the pin assignment might need to be modified. This modification is provided for in the code.

The gyro chips are marked M681 or M540 and some other similar numbers.
Mpu 6050 is also supported.

I'll add more support in the future, if I come across it, but the cpu is not easily changed. Btw, the stm chips are not usually scraped off.

I've ordered a DHD d1 for my next project


Quote:
Originally Posted by IKKI
Great and thank you
Hey , no problem.
Mar 30, 2016, 12:15 AM
Registered User
Nice work!
Any thoughts on how to compile a list of quads using the processors and gyros your firmware might run on?
FO31K6 ? in my Syma x5 I cant read the gyro chips they appear unmarked.
Im not asking you for a list but if people would look at the boards we could start a thread.
Mar 30, 2016, 12:25 AM
tHe n00b on YouTube
Quote:
Originally Posted by flyersean
Nice work!
Any thoughts on how to compile a list of quads using the processors and gyros your firmware might run on?
FO31K6 ? in my Syma x5 I cant read the gyro chips they appear unmarked.
Im not asking you for a list but if people would look at the boards we could start a thread.
Syma X5 uses InvenSense MPU 6050C gyro on my v5 board. The main differences is the Nuvoton based processor which is not supported.
Mar 30, 2016, 05:26 AM
Registered User
Quote:
Originally Posted by flyersean
Nice work!
Any thoughts on how to compile a list of quads using the processors and gyros your firmware might run on?
FO31K6 ? in my Syma x5 I cant read the gyro chips they appear unmarked.
Im not asking you for a list but if people would look at the boards we could start a thread.
Just to be clear, the pins would need to be changed to the right ones, at least.

Ian444 posted this in another thread:

Quote:
Juncheng 3015-2 STM32F031K4 and MPU-6050
CG023 STM32F031K4, M681, XN297
Bayangtoys X9 STM32F031K4, MPU-6050, XN297
Floureon X-10 STM32F031K4
Cheerson CX10 STM32F031K4, MPU-6050, XN297 depends on pcb revision, not all the same.
FQ777-124 STM32F031K4 ( several board versions including another cpu in some older ones)
GW008 Skull Quad STM32F031K4, MPU-6052C, XN297
Note that the stm32f050 is now known as stm32f031
Some other ones:
Fayee FY804 , FY805 - xn297
DHD D1 - xn297
DM003 - xn297
JJRC X1
MJX X900 , X901
XINLIN X165 - xn297
newer H8 mini with blue board - xn297 soic 8 version
DM007 - xn297


Some known not to have it:
(nuvoton cpu) - could run bradwii
Syma X5c
JJRC-1000
Hubsan 107's

(unknown cpu - not any of the above)
Eachine H8 3D
JJRC H20 , H22
Last edited by silverxxx; Apr 03, 2016 at 05:00 PM.
Apr 01, 2016, 03:16 AM
Registered User
Quote:
Originally Posted by silverxxx
Just to be clear, the pins would need to be changed to the right ones, at least.

Ian444 posted this in another thread:



Some other ones:
Fayee FY804 , FY805
DHD D1
DM003
JJRC X1
MJX X900 , X901
XINLIN X165
newer H8 mini with blue board

I only checked cpu on the above.

Some known not to have it:
(nuvoton cpu) - could run bradwii
Syma X5c
JJRC-1000
Hubsan 107's

(unknown cpu - not any of the above)
Eachine H8 3D
JJRC H20 , H22
Just in Case the 'new' H8 mini blue board uses a compatible cpu, wouldn't it be logical to port it to this board, soon? Would make those ones who ordered greens and got blues very happy I think
Apr 01, 2016, 02:19 PM
Registered User
IKKI's Avatar
I wanna suggest the DM007 and moontop M9916 FC for the fantastic possibility with acro mode and fpv... (2s battery for Dm007 and 5v regular for twice an example...)
Apr 02, 2016, 02:30 AM
Registered User
@SirDomsen

Yeah will fix up the H8 blue board when it gets here, but it's slow mail
Apr 03, 2016, 11:28 AM
Registered User
Excellent work the 2s on the DM007 sounds interesting.
Apr 03, 2016, 01:58 PM
Registered User
Saijin_Naib's Avatar
Estes Proto-X SLT (07-02-14 Board Revision)

I'm having a really hard time reading the board/chips and getting the sticker gunk off the chips, but I think the big center one is readable. Is that the one you need to know to see if it is compatible?


Thread Tools