-
Notifications
You must be signed in to change notification settings - Fork 167
Migrating from AeroQuad to dRonin
Before you can use an AeroQuad32 board with dRonin you must first flash a new bootloader onto the board. The AQ32 v2 board uses an STM32F407 microcontroller which supports USB DFU (USB Device Firmware Updater). This is nice because you do not need any specialized hardware in order to flash new firmware onto the microconroller. All you need is a USB cable. The basic steps are:
- install dfu-util for your OS/Distribution
- put the AQ32 board into Firmware Update mode
- determine the id of the board
- find the firmware for the board
- flash the firmware onto the board
- reset the board
The home page for dfu-util is http://dfu-util.sourceforge.net/ and the man page is http://dfu-util.sourceforge.net/dfu-util.1.html
I run Ubuntu so to install it is a
sudo apt-get install dfu-util
(other OS and distro's please let me know what to add....)
In order to place the board into firmware update mode you need to power up the board with the BOOT0 pin tied to a 3.3v pin. The BOOT0 pin is the pin that is closest to the USB jack and closest to the edge of the board. The 3.3v pin is closest to the USB jack on the inside row of the pin header. On the schematic, BOOT0 is JP1-1 pin 8 and 3.3v is JP1-2 pin 8. You will know if you have the board in Firmware Update mode if only the blue led by the USB port is lit and none of the others are.
dfu-util -l
You should see something like this
user@hostname:~$ dfu-util -l
dfu-util 0.8
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org
Found DFU: [0483:df11] ver=2200, devnum=16, cfg=1, intf=0, alt=3, name="@Device Feature/0xFFFF0000/01*004 e", serial="386638683234"
Found DFU: [0483:df11] ver=2200, devnum=16, cfg=1, intf=0, alt=2, name="@OTP Memory /0x1FFF7800/01*512 e,01*016 e", serial="386638683234"
Found DFU: [0483:df11] ver=2200, devnum=16, cfg=1, intf=0, alt=1, name="@Option Bytes /0x1FFFC000/01*016 e", serial="386638683234"
Found DFU: [0483:df11] ver=2200, devnum=16, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/04*016Kg,01*064Kg,07*128Kg", serial="386638683234"
user@hostname:~$
If you don't, make sure that the board is in Firmware Update mode, and if it is, unplug and re-plug in the USB cable.
Some things to note about the output:
-
The device ID is
0483:df11
-
The Internal Flash is at address
0x08000000
We will need both of these to flash the bootloader
The bootloader can be found in the firmware directory.
Windwos
<dRonin root>/firmware/bl_AQ32.bin
Linux
/usr/local/dRonin/firmware/bl_aq32.bin
macOS
/Applications/dRonin\ GCS.app/Contents/Resources/firmware/bl_aq.bin
dfu-util knows how to flash .dfu files without much help. However with a .bin dfu-util needs to know where in the chip to start writing the bootloader. That is where the Internal Flash address comes in. So to flash the chip you run:
sudo dfu-util -d 0483:df11 -c 1 -i 0 -a 0 -s 0x08000000 -D <path to firmware>/bl_AQ32.bin
Remove the jumper on the BOOT0 pin and power cycle the board.
Now you can use dRonin to flash the flight controller firmware onto the board.