OpenSky on VD5M – pinout, flashing, and usage

Disclosure: This post may contain affiliate links, meaning I get a commission if you decide to make a purchase through my links, at no cost to you.

By | September 6, 2016

In this post i am going to explain how to use my opensource firmware on a FrSky VD5M receiver. Please refer to the main page about my opensource project OpenSky for general information.

Pinout

The default configuration of my code uses the following pinout. If the board is in front of you with the leds on the upper left corner, CH1 is at the upper right corner, CH5 is at the lower right.

CH1: Bind (short this pin to GND during startup to enter bind mode)
CH2: ADC0 (max. 3.3V!)
CH3: ADC1 (max. 3.3V!)
CH4: CPPM or SBUS output (inverted or non-inverted)
CH5: debug uart output (115200baud, 8N1)

The different options can be configured in the main.h file: use the defines to select CPPM or SBUS or to redefine the pin mappings. Please note that not all pins can be freely remapped, e.g. the uart port used for SBUS is fixed to this special pin.

In addition to the servo header you can connect 6 APA102 LEDs to Pins 2 (P2.1 = APA CLOCK) and 3 (P2.2 = APA DATA) of the ISP header. Note that it could happen that you experience flashing problems long as the APA leds are connected to P2.1 and P2.2.

Flashing

In order to program the cc2510 CPU on-board of the VD5M, you will a special in-circuit programming device:

TI CC Debugger

The fastest and easiest interface is the original TI CC Debugger. You can find it at the usual resellers such as farnell, digikey or on ebay or aliexpress. This type of interface works very reliable and is the fastest, it flashes the current code in less than a second. In addition to the raw programming it also supports debugging of the target.

This programmer can be used on linux with the opensource cc-tool. Mke sure to use the patched version from here. This fix is mandatory, otherwise you get a pipe error message! Windows users can use the original software provided by TI.

Arduino based DIY solution

A cheap DIY programmer can be made out of an arduino. Just download and flash the code from this repository. This repository also includes a python script to flash the cc2510 with the diy programmer. This programmer is rather slow, it takes more than 30 seconds to flash the firmware — which is fine for upgrading but annoying durign development 😉

Raspberry Pi 2

Jimmyw portet the cc2510lib to the raspberry pi 2. You can find his code and a tutorial on his github account. This solotuin needs no level shifters and seems to be quite fast. Right now i have no experience with that.

It is handy to mount a 5pin Molex Picoblade connector to the 5pin ISP connection on the side of the VD5M. This way it is easier to do firmware upgrades in the future. With pin 1 being the squared pad next to CH1-5 the pinout of this connector is:

[1]: VCC (3.3V, squared pad)
(2): P2.1 = DBG DATA
(3): P2.2 = DBG CLOCK
(4): GND
(5): RESET

Once everything is connected it is time to build the source. Make sure to have the SDCC compiler installed.

export TARGET=VD5M
make clean
make

There should be no warnings and you will end up with a hex file you can flash to the board. If you are using the CC Debugger the makefile has a target to do wall the work for you. Simply connect your board to the CC Debugger and type

make flash

This should launch cc-tool and flash your board. If you get a no target connected error message please press the reset button on the CC Debugger. Sometimes it does not detect the target properly, this should fix it. If not, double check all connections and make sure that the VD5M board is powered up.

Debugging

When you connect a serial to usb connector (RX) to the debug output pin CH5 and set up your terminal to 115200 baud 8N1 you will see the following debug messages:

TODO: ADD EXAMPLE DEBUG OUT

This is quite useful for debugging or initial set up, however, please disable it by uncommenting the DEBUG entry in main.h for real use.

Usage

The usage is straightforward, connect the SBUS or PPM output to your flightcontroller and set it up properly. Optionally connect the hub telemetry input [TODO: add hub telemetry PIN documentation!!!] and configure your flight controller to output FrSky hub telemetry at 9600 baud (8N1).

Please note that the range of the VD5M is quite limited due to the missing PA/LNA amlifiers! This board should be used with small and leightweight equipment that is flown at a close range.

Disclaimer

Please see the disclaimer on the OpenSky main page. DO NOT use this code on dangerous equipment! I am not responsible for any damage/injuries caused by using this code!

Leave a Reply

Your email address will not be published. Required fields are marked *