RC India

RC Equipments => Radios and Receivers => Topic started by: hyd_quads on June 24, 2015, 03:21:50 PM



Title: Turnigy 9x mod: firmware flashing - Errors and Fixes
Post by: hyd_quads on June 24, 2015, 03:21:50 PM
I know it's too late to post this now, because the 9xr pro (http://www.hobbyking.com/hobbyking/store/__51442__Turnigy_9XR_PRO_Radio_Transmitter_Mode_2_without_module_.html) comes pre-flashed with er9x, but this may help those trying to flash their 9x with either er9x (https://code.google.com/p/er9x/) or openTX (http://www.open-tx.org). I just flashed my 9x with openTX after a LOT of struggle, trying to figure out what went wrong. I followed this guide (http://barrettsprojects.wordpress.com/2013/01/07/er9x-custom-firmware/).

My setup: Turnigy 9X, USBasp (ATMega 8 ) programmer from a local shop (THE CULPRIT!), eePe with avrdude, Win7 32bit.
This is a list of errors I came across while flashing and here are their fixes.

#1.
Problem: USBasp shows up in Device Manager (without a yellow (!) triangle) with drivers properly installed, BUT avrdude says
avrdude.exe: error: could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc

Issue: It's your programmer. It probably has a jumper for toggling between 3.3V/5V and an associated resistor - its value is a bit too high causing the MCU to get low voltage. My programmer had this jumper, and several others do. Eg. Betemcu USBasp (http://www.aliexpress.com/store/product/1Lot-2PCS-1PCS-USBasp-USB-ISP-3-3V-5V-AVR-Programmer-USB-ATMEGA8-ATMEGA128-New-1PCS/812021_577097498.html)

Fix: (temporary, didn't work perfectly in my case) plug in Turnigy 9x into your programmer first and then connect the programmer to your computer.
(permanent, worked like a treat!) - Figure out which resistor that is, and short it out. You'll find this resistor near the jumper for toggling 3.3V/5V.
Refernce: here (http://9xrprogrammer.com/index.php/learn/34-troubleshooting)

#2.
Problem: avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.

Issue: The programmer sets the sck period automatically. That's how its programmed to function.  (References: this (http://openrcforums.com/forum/viewtopic.php?f=5&t=1857) and several others)

Fix: YOU CAN IGNORE THIS ERROR.

#3.
Problem: avrdude.exe: Device signature = 0x000102
avrdude.exe: Expected signature for ATmega64 is 1E 96 02
             Double check chip, or use -F to override this check.

Issue: It's your programmer. (Refernce: here (http://openrcforums.com/forum/viewtopic.php?f=10&t=2490)
Fix: (might sound silly, but worked for me.) Put all the Tx switches in their default positions (as in you would to eliminate the infamous switch error with the stock firmware!) but the throttle stick in Max. position. (Reference: here (http://"http://openrcforums.com/forum/viewtopic.php?f=94&t=2546"))

#4.
Problem:

Reading | ################################################## | 100% 0.00s

avrdude.exe: Device signature = 0x1e9602
avrdude.exe: NOTE: FLASH memory has been specified, an erase cycle will be performed
             To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
avrdude.exe: reading input file "C:/Users/XYZ/ABC/er9x.hex"
avrdude.exe: writing flash (60724 bytes):

Writing | ################################################## | 100% 23.97s

avrdude.exe: 60724 bytes of flash written
avrdude.exe: verifying flash memory against C:/Users/XYZ/ABC/er9x.hex:
avrdude.exe: load data flash data from input file C:/Users/XYZ/ABC/er9x.hex:
avrdude.exe: input file C:/Users/XYZ/ABC/er9x.hex contains 60724 bytes
avrdude.exe: reading on-chip flash data:

Reading | avrdude.exe: error: usbasp_transmit: usb_control_msg: sending control message failed, win error: A device attached to the system is not functioning.
................

Issue: Your programmer has several (in my case, three) inline resistors (of a high value - reportedly ~100/150ohm) on the target side (turnigy 9x, in this case) whereas they should be of 0-30ohm.
Fix: Short these resistors out with a plain peice of wire. In my local programmer, there were 3 of them. One at MISO, one at MOSI, one at LED. Its better to swap the 100ohms with ~30ohms but shorting them out worked for me.

Attached pics show my programmer and the resistors I had to short.
1: The "jumper" resistor shorted using a wire.
2: The "jumper resistor removed cmopletely and ckt completed with a wire
3: Three inline resistors removed.
4: Ckt completed using 3 pieces of wire.


Title: Re: Turnigy 9x mod: firmware flashing - Errors and Fixes
Post by: GD on December 30, 2015, 02:54:38 AM
Today I try to flash my 9x using usbasp purchased from eBay, and another different problem I am facing. Here is the screenshot of the error message i am getting.

Note: I have double checked connection, all find good.

Suspecting firmware problem as per the readings.

Further advice will be appreciated.

Thanks and regards
Dhanasekar


Title: Re: Turnigy 9x mod: firmware flashing - Errors and Fixes
Post by: AshwinRwt on December 30, 2015, 02:52:14 PM
@GD ji, do as it says, check the connections, again. I changed the uC from m64 to m128, I was pretty confident about my soldering, but there was a problem (a3 leaking into a1) which was only solved by removing the chip, cleaning the board and starting from scratch.
@hyd-quads ji, about the issue no.2, did you try -b and -B options in avrdude? I believe that you should never ignore a problem, especially with avr chips.


Title: Re: Turnigy 9x mod: firmware flashing - Errors and Fixes
Post by: xlnzee on August 17, 2016, 07:55:10 AM


Hi, I have  FlySky TH9X that I would like to install OpenTX or ER9X on but i am stuck with a error that "target doesn't answer. 1" and asks me to check the connections. I have checked the soldering and also resoldered the wires thrive but get the same error.

I am from Hyderabad, can you help me in getting OpenTX flashed in my receiver? I would really appreciate your help.

Thank you.


Title: Re: Turnigy 9x mod: firmware flashing - Errors and Fixes
Post by: xlnzee on August 17, 2016, 07:56:51 AM
@GD ji, do as it says, check the connections, again. I changed the uC from m64 to m128, I was pretty confident about my soldering, but there was a problem (a3 leaking into a1) which was only solved by removing the chip, cleaning the board and starting from scratch.
@hyd-quads ji, about the issue no.2, did you try -b and -B options in avrdude? I believe that you should never ignore a problem, especially with avr chips.

Hi, please see my post above, I see that you are from Hyderabad too, is it possible for you to help me with the flashing as I suspect it's my programmer which is to blame, do let me know, thanks!