Sunday, March 8, 2015

FS-T6 firmware upgrade

As we are working on FS-T6 custom FW (called AR-T6) we are trying to provide an easy path for early adaptors. Here is how to program the AR-T6 firmware  into your Tx or revert to the original. Both without opening the case.


What is needed:
- stm32flash utility (can be build on linux and windows) or a STM loader demonstrator
- compiled ar-t6.bin or original fs-t6.bin fw
- serial port or usb-to-serial adapter
- some means to connect adapter's leads to the port on FS-T6
- some knowledge of cmd line on linux




Connections:
BLACK - GND to the S-Video ring
WHITE - PC Rx to T6's Tx
GREEN - PC Tx to T6's Rx
(see: student cable for connections)

Note that to get a good grounding I had to bend the pin of black ground wire and wedged it into the space.
Also note that the connection is potentially very flaky and may soft-brick your Tx if interrupted in the middle (recovery possible but only with an SWD cable). A safer way would be to use a CT6B cable or to make a custom cable from an S-Video one...as described here)













Linux

check connection:

~/stm32flash$ sudo ./stm32flash /dev/ttyUSB0
stm32flash 0.4

http://stm32flash.googlecode.com/

Interface serial_posix: 57600 8E1
Version      : 0x22
Option 1     : 0x00
Option 2     : 0x00
Device ID    : 0x0420 (Medium-density VL)
- RAM        : 8KiB  (512b reserved by bootloader)
- Flash      : 128KiB (sector size: 4x1024)
- Option RAM : 16b
- System RAM : 2KiB


To program custom fw:
~/stm32flash$ sudo ./stm32flash -w ar-t6.bin -v /dev/ttyUSB0
stm32flash 0.4

http://stm32flash.googlecode.com/

Using Parser : Raw BINARY
Interface serial_posix: 57600 8E1
Version      : 0x22
Option 1     : 0x00
Option 2     : 0x00
Device ID    : 0x0420 (Medium-density VL)
- RAM        : 8KiB  (512b reserved by bootloader)
- Flash      : 128KiB (sector size: 4x1024)
- Option RAM : 16b
- System RAM : 2KiB
Write to memory
Erasing memory
Wrote and verified address 0x0800f178 (100.00%) Done.



To program custom fw:
~/stm32flash$ sudo ./stm32flash -w fs-t6.bin -v /dev/ttyUSB0
...


In Original FW you go to Menu, System, scrol down to "Firmware Upgrade".
In AR-T6 go to Menu, System, Version page, Menu (pres&hold SELect roller).


Thanks go to Martin, here is his writeup.


9 comments:

Lúcio André said...

you do not connect the vcc ?? only the gnd, Rx and Tx ??

Michal K said...

Yes, no need for vcc. The transmitter should be self-powered (batteries/wallward).

Lúcio André said...

I made connections correctly. I chose the firmware update mode the display menu. However in charge stm32flash COM5 get Failed to init device. Can you help me ??

minhthien said...

Hi
i try to looking for a chip stm32f100 for this TX , but i can not find it in my country , so i can replace by chip stm32f103 ? it is same pin .

i have to change code ?

Michal K said...

Lucio,

Sorry for the delay, vacation time...
"failed to init the device" - potential porblems:
- using wrong COMx port (I suppose you are on Windows?)
- connections are wrong (GND not well connected or sth swapped - your serial adapter has different cable color scheme)

I advice you to purchase the original CT6B cable as it comes with correct plug.

Unknown said...

Hi Michal, I was able to connect radio control via FS CT6B cable to try to change the firmware.
Unfortunately, after erasing all memory, I could not install the new firmware.
Now the radio control is death, i push on power button, but nothing happens. Now I can not install anything to the normal and easy way. Clearly I will need to open the box, but not clear to me how to connect to memory and to install the new firmware.
Thank you in advance!

Unknown said...

I Also have this problem..Is it dead..Or can it be fixed

Michal K said...

I do not know why it failed via the cable. Chances are the hardware is still ok.

One recovery method would be to get the STDiscovery board and connect the SWD debugger cables as explained elsewhere, see:

http://minkbot.blogspot.com/2014/10/fs-t6-and-swd-hack.html

Yes, a real hacking I am afraid.

Vineet said...

Hey i had soft bricked my tx and don't know how to get back the original firmware any help with that I'm not particularly good with embedded systems... I was just playing around with the normal jumpers and had soft bricked and any way to get back the original firmware without hacking