Olimexino STM32

Product link: Olimexino STM32

PX4 UAVCAN Node

Connecting Power

Use a mini a-b USB cable or a 9-30V DC wall wart.

Debug Port

The Olimexino-STM32 console pins are brought out on the UEXT connector (10 pin connector next to the power jack)

UEXT Signal FTDI Signal
1 +5V N/C
2 GND 1 FTDI GND (black)
3 Tx 5 FTDI Rx (yellow)
4 Rx 4 FTDI TX (orange)

The Demo is built with the Console on the Olimexino-STM32 configured 115200, 8, n, 1

CAN Port

Olimexino-STM32 Signal PX4 CAN Cable
NC +5V 1
1 CAN H (White) 2
2 CAN L (Yellow) 3
3 GND (Blue) 4

Building and Installing the UAVCAN node Demo

Windows with TortoiseGIT and Eclipse

Create a folder without spaces in the path, e.g. C:\px4, then right-click into the folder and select “Git clone…”. Enter the URL below to clone.

https://github.com/PX4/Firmware.git
  1. Now start Start → Programs → PX4 Toolchain → PX4 Eclipse. in Eclipse, select File → Import → C/C++ → Existing Makefile project. Select the Firmware directory.

Linux and Mac OS or Windows (PX4 Console)

Windows users: Start PX4 Console, then you're able to run the same commands. Instead of ~/src Windows users might prefer to use /c/px4 as directory.

cd ~/src
git clone https://github.com/PX4/Firmware.git
cd Firmware
git checkout nuttx_next
git submodule init
git submodule update --recursive
make distclean && BOARDS="px4io-v2 px4fmu-v2 px4cannode-v1" make archives && make px4fmu-v2_default px4cannode-v1_default

Flashing UAVCAN

Loading the PX4FMU with the test application

make upload px4fmu-v2_default

see http://www.pixhawk.org/dev/nuttx/building_and_flashing_console for details

Loading the Olimeino-STM32 with the test application

There is currently no bootloader for the Olimexino-STM32 for loading .px4 file. Programing will be done using the Black Magic Probe.

Olimexino with Black Magic Probe

Connect the Jtag cable to the SWD connector, noting the orientation of pin 1.

cd Build/px4cannode-v1_default.build/
arm-none-eabi-gdb firmware.elf
gdb> target extended-remote <name of black magic port, e.g. /dev/ttyACM0 or /dev/ttyUSBxx or COM0>
gdb> mon swdp_scan
gdb> attach 1
gdb> load
gdb> kill
gdb> quit

Hit the reset button (closest to the power plug) after the load.

A successful flash looks like this on the console:

              total       used       free    largest
Data:         13680      11912       1768       1696
Prog:        132096     124928       7168       7168
   2 uavcan          40277   932/ 1044 240 (240)  RUN

              total       used       free    largest
Data:         13680      11912       1768       1696
Prog:        132096     124928       7168       7168
   2 uavcan          40354   932/ 1044 240 (240)  RUN

Olimexino Demo Application setup

We use a Radio shack Full-Color LED 276-0028 and a 330 ohm resistor connected to the EXT and UEXT connectors.

http://www.radioshack.com/t-1-3-4-5mm-full-color-led/2760028.html#.VRSavPnF80E&tab=tab2

UEXT Signal LED
1 +5V 330 Ohm A
EXT Signal LED
13 RGB_RED R
14 RGB_BLUE B
15 RDB_GREEN G

The LED is a Common Anode

|---------  G
|---------  B
|---------------- A
|---------  R

The Demo application will transmit messages from the PX4 to the node.

The following uavcan messages are used

uavcan::equipment::esc::RawCommand - Will just display the scaled value (seems to be always 0)
uavcan::equipment::esc::RPMCommand - Would print the rpm but it is not sent by PX4
uavcan::equipment::indication::LightsCommand - keep in mind it is RGB 565

For LightsCommand:

The px4's uavcan application has the added 'led' command:

uavcan led <r> <g> <b> <hz>

uavcan led 0 0 0 1 - All LEDs off
uavcan led 0 0 0 0 - Stop LED Publish
uavcan led 8  32 16 255 - Will send flash rapidly (31 hz)

On the px4 console enter

uavcan start
#------    r  g b Hz
uavcan led 2 32 1 20

On the Olimexino's console you will see:

              total       used       free    largest
Data:         13680      11912       1768       1696
Prog:        132096     124928       7168       7168
   2 uavcan         438961  1008/ 1044 240 (240)  RUN
scaled:0
rgb:66 130 132 hz 31
              total       used       free    largest
Data:         13680      11912       1768       1696
Prog:        132096     124928       7168       7168
   2 uavcan         439053  1008/ 1044 240 (240)  RUN
scaled:0
rgb:66 130 132 hz 31
scaled:0
Translations of this page:


Quick Links

QR Code: URL of current page