Brian Webb
  • Blog
  • Contact

pixie debug v0.2

8/29/2014

0 Comments

 
In order to debug the Pixie Flight Controller I needed to at least create an adapter that breaks out the SWD pins on the expansion port to a debugger.  Instead of doing that I decided to create a custom debug board that would both debug the Pixie and serve as a compact and easy to use debugger for other projects.

In the past I've used several JTAG probes.  More recently I started using STM32 discovery boards for SWD debugging.  The discovery boards work well, but they're pretty bulky for their purpose, so I've been looking for a more compact alternative.  I tried several of the small st-link compatible adapters on ebay.  They generally work, but I've had some issues with them, and who knows where the firmware comes from.

Recently I ran across the Black Magic Probe.  This is both an open source software and hardware project that supports debugging STM32 as well as other Cortex MCUs.  Unlike most other debuggers, it doesn't require any external software, such as OpenOCD, etc, because it implements the GDB extended remote interface in the firmware.  It presents two CDC serial ports, one of which is the GDB interface, and the other is a direct link to an on-board UART.  This allows one to connect GDB directly to the first CDC serial port for flashing firmware and debugging, and connect a terminal program to the other for debug output, etc.  I find it to be very elegant.

You can buy an official Black Magic Probe from several distributors, but I decided to try it out by trying to flash the firmware to one of the many st-link clones that I bought on Ebay.  It turns out that it is very easy to port to most any STM32 device, and it actually works pretty well on the Ebay clones.  I may document how to do that in a later post, but it's probably easier to just buy an official Black Magic Probe, especially if you don't already have one of the st-link clones.

After trying out the BMP firmware I decided that it wouldn't be very hard to just build a debug board similar to the BMP that would connect directly to the Pixie, and could be used in other projects as a small debugger.  That's where Pixie Debug came from.

Picture
Pixie Debug V0.2
Above you can see a picture of the top side of the Pixie Debug board.  It contains:
  • STM32F103 MCU
  • UART1 (can be passes through to USB serial interface).
  • USB interface
  • Standard 0.05" JTAG connector
  • An SWD port for connecting to boards other than the Pixie.
  • Pixie expansion port that connects to SWD and USART6 on Pixie.  It also connects to the SPI, which could be useful for something.
  • 4 LEDs


The bottom of the board is essentially empty, so it's a one-sided board.

Picture
The schematic is very similar to the original Black Magic Probe, with the addition of the Pixie expansion header, etc.  I made the form factor the same as the Pixie both because it was easy, and as a first test of using the expansion header.  The next version will likely be a more conversational form factor with 0.1" headers.

I am very happy with the Black Magic Probe firmware, and would recommend it to anyone who normally uses GDB to debug and develops for the supported MCUs.
0 Comments

pixie V0.96

8/28/2014

0 Comments

 
One of the boards that I've been working on over the last couple of months is an updated Pixie IMU / flight controller.  In the previous iteration I put very little I/O on the main board, intending to make a few I/O boards for various configurations.  On this iteration I reverted back to a more traditional design, which includes many communications options as well as an expansion port for connecting peripheral boards.

Version 0.96 of the Pixie board includes the following:
  • 24x24 mm board, with 20 mm hole spacing
  • 2 grams
  • STM32F415RG MCU
  • MPU-9250 IMU (via SPI)
  • MS5611-01BA03 Pressure Sensor (via SPI)
  • MX25L3206E 32 Mb SPI Flash
  • USB OTG
  • 10-pin servo port, supporting 8 output(/input) channels
  • USART1 port
  • USART3/I2C port
  • USART2 port with flow control.  Also supports 4 ADC.  Can also serve as a combination Voltage / Current / Sonar / Rx input port.
  • CAN port with 3.3V transceiver
  • 12 pin (dual 0.05") expansion header, supporting SPI2, UART6, and SWD.  Also contains CAN2 (without transceiver).
  • Expansion header outputs both battery/USB voltage and 3.3V (up to 500mA total current).
Picture
Pixie Version 0.96 - top of board
Above you can see the top of the board, containing the MCU, IMU, pressure senser, and flash.  The expansion header (yes it's misspelled on the board) can be seen on the left.

Picture
Pixie V0.96 - bottom of board
Above you can see the bottom of the board.  It's pretty crowded with connectors, but most of the components fit on the top of the board, so it's not too crowded.  The bottom includes the voltage regulator and CAN transceiver.

Picture
Pixie compared to (prototype) OpenPilot Revolution
In the picture above you can see a size comparison between the Pixie and a an OpenPilot Revolution board, which is 35x35 mm.

So far I've been able to load a version of a TauLabs bootloader and firmware and verify that the MPU-9250 and SPI flash work as expected.  Unfortunately the board has a minor defect that destroyed the chip select line on the pressure sensor, so I'm currently unable to test that.  I still need to test the CAN interface and all the I/O ports.

For some reason the magnetometer is flaky on the MPU-9250.  Sometimes it is detected and sometimes not.  I suspect the MPU-9250 is just bad, but I need to replace it to know for sure.  It's been re-flowed a couple of times, so it might be just heat damaged.

As soon as I have the firmware fully configured I plan to flight test it.  I have a couple of options for mounting it, as I'll go over in a future post.
Picture
Pixie V0.96 Schematic
0 Comments

    Author

    Brian Webb lives in Tucson, Arizona. His interests are in embedded hardware and software development, especially for UAV avionics.

    Brian Webb was previously very active in the OpenPilot project, where he developed advanced firmware for the OPLink Modems. Brian was involved in development of the flight firmware for the CopterControl and Revolution platforms.
    

    Archives

    August 2014

    Categories

    All
    Flight Controller
    Hardware
    Pixie
    STM32

    RSS Feed

    View my profile on LinkedIn
Proudly powered by Weebly