Could someone help with a tip? After several hours of trying to work and searching for a solution on the Internet, I am about out of options on why flashing the firmware in my brand new Turnigy 9X won’t work. I tried several guides posted on er9X http://code.google.com/p/er9x/ and th9X http://code.google.com/p/th9x/ and RC Groups and TowerHobbies discussions.

I think the problem most likely lies with power supply and/or a USB hub I am using. I cannot connect the Sparkfun Pocket AVR directly to the laptop USB, it won’t let me install the Sparkfun Pocket AVR driver. So I think when I have the laptop connected to the Pocket AVR via the USB hub and the Pocket AVR to the X9, the laptop software cannot “see” the X9 because of the USB hub(?)

It’s a “virgin” Turnigy 9X with V2 firmware. I have done the hardware modification as described in both er9X and th9X guides:
- by running wires from VCC, GND, MISO, MOSI, SCK, RST on the X9’s circuit board out to a Sparkfun Pocket AVR Programmer. Connected MISO to MISO, MOSI to MOSI, etc
- From Acer One Laptop using external powered USB hub connected to Sparkfun Pocket AVR Programmer (Turned on external target power switch on Pocket AVR Programmer)
- From Sparkfun Pocket AVR Programmer with factory 10-pin to 6-pin ribbon cable to Turnigy X9’s modded circuit board connections
- No batteries connected to the Turnigy X9

This is what’s happening:
1. When I plug in Pocket AVR directly in the laptop’s USB, only the blue light (power) comes on, the laptop notices it but installed a Windows driver, and won’t let me install the Pocket AVR driver, it says could not find a better match. Tried to install the driver directly from the folder by pointing to it and keep getting “the specified location does not contain information about your hardware”
2. So I added a un-powered USB hub and it registered as unknown USB device and was able to install the (unsigned) driver for Pocket AVR on my XP system
3. Now the Pocket AVR has one red (stat1) and one blue light (power) on. ( I think “stat2” should turn on if all working fine when reading/writing the code).
4. As soon as I connect the Pocket AVR to the USB via the powered hub while the X9 is also connected, the Turnigy X9 turns on to the main screen, shows 4V and beeps every 5 sec or so (I read that this is ok)
5. When I run the eePe editor and select USBtiny, etc and execute, it calls for Avrdude to read the EEPROM in the X9, and I get an error message.
Avrdude.exe: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check
6. Avrdude recognizes the Pocket AVR Programmer, but cannot ID the Turnigy X9’s chip.


My hardware setup:
Acer One Laptop USB port
USB hub with and without external power
Sparkfun Pocket AVR Programmer

My software setup:
Windows XP Pro
Installed driver and confirmed that Pocket AVR Programmer showed up in Device Manager
Option 1: eePe EEPROM editor/custom flasher that contains Avrdude as well
Option 2: WinAVR with Avrdude and avrdude-gui_v0.2.0 GUI interface

Things I have done:
- Checked with ohm meter continuity from Pocket AVR Programer’s pins to all the way to Turnigy 9X-s main chip pins for MISO, MOSI, SCK, RST and also VCC and GND on the board (BTW: my Spakfun Pocket AVR programmer had one row of pins incorrectly labeled backwards. I read on Sparkfun’s website that this was corrected in the next batch). I checked this many many times. I am 99.9% sure it’s correct.
- Connected Pocket AVR Programmer directly to USB port (laptop would not recognize it). Had to use USB hub and recognized it so I could install driver. Later used powered USB just in case my Acer One laptop power is not enough to power the Pocket AVR and the Turnigy X9.
- Made sure target power switch on Pocket AVR Programmer is ON. Later I connected the Turnigy to its own battery and turned the target power switch on Pocket AVR Programmer OFF. I wanted the X9 to have its own power just in case there isn’t enough power from the USB hub to run the AVR programmer.
- I tried to run avrdude-gui_v0.2.0 GUI interface inside the WinAVR folder and selected Atmega 64, same Avrdude error message
I tried another larger laptop (Win XP), here finally was able to connect the Pocket AVR directly and had both the red and blue light on, but same message: “ avrdude.exe: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check

Should I try on my Win 7 –x64 laptop? I read that the driver installation is a hassle and requires an unsigned driver validation third-party program and a watermark removal program.


I would appreciate anyone who can provide some tips. I know there could be a thousand different issues wrong, but I am pretty sure it’s a driver issue.

Thank you,

Tom

Tags: avr, avrdude, flashing, pocket, programmer, turnigy, x9

Views: 1620

Reply to This

Replies to This Discussion

This is the error I get:
=================================================================================
Started AVRDUDE
C:/Program Files/eePe/avrdude.exe -c usbtiny -p m64 -U eeprom:r:C:/DOCUME~1/Tom/LOCALS~1/Temp/temp.hex:i
=================================================================================

avrdude.exe: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.


avrdude.exe done. Thank you.


=================================================================================
AVRDUDE done - exit code 1
=================================================================================








When I try to use -F to override the chip ID this is what it says:

=================================================================================
Started AVRDUDE
C:/Program Files/eePe/avrdude.exe -c usbtiny -p m64 -F -U eeprom:r:C:/DOCUME~1/Tom/LOCALS~1/Temp/temp.hex:i
=================================================================================

avrdude.exe: initialization failed, rc=-1
avrdude.exe: AVR device initialized and ready to accept instructions
avrdude.exe: Device signature = 0x000000
avrdude.exe: Yikes! Invalid device signature.
avrdude.exe: Expected signature for ATMEGA64 is 1E 96 02

avrdude.exe done. Thank you.


=================================================================================
AVRDUDE done - exit code 1
=================================================================================

Win XP, normal drivers, SFE Pocket AVR Programmer works just great with er9x instructions. I have flashed many TGY's with that. So check your cabling to TGY and did you power TGY properly from programmer?

 

Jani,

 

Thanks for the reply.

 

When I plug in the SFE Pocket AVR Programmer in the USB port, the TGY turns on and beeps low voltage every few seconds (I have no batteries in it).  I read that that's normal, since it shows 4V.  At the same time,  the Pocket AVR Programmer is now showing up under Device Manager ok.  The blue power LED and the red status1 LED both come on with plugged in the USB.  

 

Looks like I will need to check each and every cable again from the Pocket AVR Progammer to the TGY's circuit board.

 

Well, I went back and checked all my connections and they were good. I checked with an Ohm meter directly from the 10-pin Pocket AVR Programmer to the microchip pins on the TRNGY X9's board and the RST, VCC and GND points on the X9.

I check the Voltage on the RST and it was 5.02V, which is ok based on what I read in the Sparkfun blogs.

I tried to add -B with various values to see if this may be a programming frequency issue, tried -F override, and used -v to get some idea what's going on. I used both WinAVR with a GUI using avrdude 5.1 and eePe with avrdude 5.1 as well.

This is what I got when used -v:

=================================================================================
Started AVRDUDE
C:/Program Files/eePe/avrdude.exe -c usbtiny -p m64 -F -v -P usb -U eeprom:r:C:/DOCUME~1/Tom/LOCALS~1/Temp/temp.hex:i
=================================================================================

avrdude.exe: Version 5.10, compiled on Jan 19 2010 at 10:45:23
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "C:\Program Files\eePe\avrdude.conf"

Using Port : usb
Using Programmer : usbtiny
AVR Part : ATMEGA64
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 4 20 64 0 no 2048 8 0 9000 9000 0xff 0xff
flash 33 6 128 0 yes 65536 256 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 4 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : USBtiny
Description : USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/
avrdude.exe: programmer operation not supported

avrdude.exe: initialization failed, rc=-1
avrdude.exe: AVR device initialized and ready to accept instructions
avrdude.exe: Device signature = 0x000000
avrdude.exe: Yikes! Invalid device signature.
avrdude.exe: Expected signature for ATMEGA64 is 1E 96 02

avrdude.exe done. Thank you.


=================================================================================
AVRDUDE done - exit code 1
=================================================================================

Ordered USBasp.  Will see if the Sparkfun Pocket Programmer is faulty. It was mislabeled anyway.

 

The USBasp arrived, within 10 minutes I flashed the X9 with er9X.  

 

Thanks for you help Jani. Apparently, the Sparkfun Pocket AVR setup is not worth the hassle, I spent several hours on it.

I think you will find that your Device signature = 0x000000 problem is shared between the programmer and the Turnigy 9x. The Ladyada USB (known to avrdude as usbtiny) programmer schematic shows 1k5 short circuit protection resistors in the SCK and MOSI programming lines. I suspect that your programmer has the same circuit. The Turnigy 9X has 200R and .1uF capaitors on these lines to debounce the button inputs to the ATMega64. Unfortunately the debounce circuit slows down the programming pulses and prevents programming. Reducing the two 1k5 resistor values in the programmer to 100R fixes the problem, but so does choosing a different programmer!

I tried slowing down the programmer with -B option, but could not get the pulses slow enough.

 

Richard.

Did anyone ever get to the bottom of this error using eepe and the AVR Programmer. I am getting (almost) the very same thing. Using a Turnigy 9x V2, AVR Programer and the latest version of eepe. I plug in the avr programmer, connect to the Turnigy and the programer shows two blue light and a single red. The Turnigy 9x starts to beep at 4 second intervals but when I try to download the chip data from the Transmitter (I want to back it up before attempting to flash), I get the error "Error: unable to locate C:/DOCUME~1/Tom/LOCALS~1/Temp/temp.hex" - the file is there, I can see it. I could place it somewhere more obvious (for example, in the root of C:) but I can't find any preference in eepe to change the default location.

Have checked all my wiring/soldering, that's fine. I even took it all off and started over. Have checked contacts with multimeter and they are fine.

Can anyone suggest solutions or point me in the right direction to get this fixed?

It would be much appreciated. 

 

RSS

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The third round was a reliablilty/aerial photography round for both planes and copters, which is now closed. Stay tuned for the next round, beginning soon.

A list of all T3 contests is here

 

© 2012   Created by Chris Anderson.

Badges  |  Report an Issue  |  Terms of Service