I know it's too late to post this now, because the
9xr pro comes pre-flashed with er9x, but this may help those trying to flash their 9x with either
er9x or
openTX. I just flashed my 9x with openTX after a LOT of struggle, trying to figure out what went wrong. I followed
this guide.
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 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#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 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:
hereFix: (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)
#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.