Skip to content

Migrating from AeroQuad to dRonin

Guy Thomas edited this page Sep 27, 2017 · 23 revisions

NOTE: This page is a work in progress under active editing. Nothing here is true! (yet).....

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

Install dfu-util for your OS/Distribution

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....)

Place board in Firmware Update mode

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.

Test to be sure dfu-util can see the board

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

Find the firmware to use

The bootloader can be found in the firmware directory.

Windwos

<dRonin root>/firmware/bl_AQ32.bin

Linux

<dRonin root>/firmware/bl_AQ32.bin

Flash the bootloader onto the board

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

Reset the board to normal mode

Remove the jumper on the BOOT0 pin and power cycle the board.

Launch dRonin and plug in the board

Now you can use dRonin to flash the flight controller firmware onto the board.

Clone this wiki locally