Hardware preparations CX-10
The general steps are as follows:
- Solder wires to the board.
- Configure the STLink of the Discovery board.
- Apply external power to the Vdd pin of the SWD.
- Clear flash memory of the chip.
The following items are required:
- CX-10 quadcopter (~$15)
- STM32F4-Discovery Board (~$15)
- Some wires and female pin headers for a connector
Solder wires to the board
This link basically tells it all: http://www.rcgroups.com/forums/showthread.php?t=2292847
And this is what is looks like:
Configure the STLink of the Discovery board.
I used the STM32F4 Discovery Board as programmer for the CX-10. This is a cheap solution but another STLink programmer will do as well. The jumpers need to be removed as shown in the picture (I left them on to prevent losing them). Then, I made an ugly adapter to fit the connector on the drone.
Apply external power to the Vdd pin of the SWD
The blue version of the CX-10 had a power regulator that is normally enabled by the STM32F050 processor itself. But if this power regulator is disabled, the processor also has no power! This becomes problematic when flashing the device, since it is not able to supply power to itself. We need an external power source while flashing the device. I solved it the quick and dirty way by extracting 3 Volts from the VDD pin of the Discovery Board.
Clear flash memory of the chip
Read protection of the processor is enabled by default at level 1. This needs to be disabled before the device can be flashed. This can be accomplished through the STLink Utility (only available for Windows). Go to Target->Option Bytes, select Level 0 and press apply. Then, go to Target->Erase Chip. Make sure to apply external power to the VDD-pin of the SWD connection. If anyone knows how to do this in Linux, let me know!
The next step is getting to blinky.
Comments
Pingback: Best Quadcopters with open source firmware. | dronegarageblog
Owlpic - January 14, 2016 at 12:27 am
Good Job! The CX-10 is an excellent learning copter, have given out many of them as their first Quadcopter. The weight to thrust ratio is similar to a full size copter.
Elliott - June 22, 2021 at 4:16 am
I’ve done some bare metal with an STM32F103 using ST-Link on Linux with a various bag of open source and proprietary goodies and just ordered one of these, I’ll post my findings here if I get it working.