Page 1 of 1

USBasp / er9x / eepe flashing problems

Posted: Sun Jan 13, 2013 2:47 pm
by metalfred
I just wanted to post this so that might help someone having the same problems that I had.

As a quick background, I own this FS-TH9X v2 radio for 2 years now and I have done many modifications to it. This radio is awesome.

I have been flashing the latest er9x very often, I am using cheap ass ebay programmers and never had any problems.

But for a couple of weeks, I couldn't flash / communicate with the radio, I have verified all connections, checked the fuses, built an external oscillator to fix them and none of this worked.

I was getting the invalid device signature error:

Code: Select all

avrdude.exe: Device signature = 0xf0e1f2
avrdude.exe: Expected signature for ATMEGA64 is 1E 96 02
I have found what was causing this problem, at least for me, its very simple...! All the switches on the radio must be to their default position, I am not sure why this is needed! "Switch Startup Warning" is disabled on my radio but it doesn't matter when you flash the device, all switches must be to their default position.

I hope this helps someone and you don't waste your time trying to find the problem like I did.

Re: USBasp / er9x / eepe flashing problems

Posted: Sun Jan 13, 2013 2:53 pm
by Kilrah
You probably have a programmer that has inline protection resistors with a value that's a little too high. When the switch is on it will draw some current and reduce the signal. Was maybe just at the limit.

EDIT: See here for some discussion on the matter: viewtopic.php?f=10&t=2490

Re: USBasp / er9x / eepe flashing problems

Posted: Mon Jan 14, 2013 6:43 am
by Scott Page
O wow, that's very interesting in light of the crazy problems I was having flashing my 9XR. I'm hesitant to touch it, (now that it finally works) but am probably going to have to try that.

Re: USBasp / er9x / eepe flashing problems

Posted: Thu Jun 06, 2013 1:16 pm
by ReSt
I just discovered a similar problem like metalfred above.
I have two TGY9X and have (nearly) never had problems with programming it (with a cheap eBay programmer, I think it' one from betemcu with 100 Ohm resistors)
Lately I changed the m64 cpu to M128 in one of the radios.
And since then I some times had problems programming the M128. Avrdude did read an id of 0000102 for the cpu.

And I found the reason of my problem: the throttle switch.

It's hard reproduceable. With throttle switch down, the M128 fails programming. Throttle switch up and everything is fine.

Reinhard

Re: USBasp / er9x / eepe flashing problems

Posted: Thu Jun 06, 2013 2:44 pm
by MikeB
If you haven't done the Telemetry mod, then when the throttle switch is down, then the MOSI signal is connected to ground through a 200 ohm resistor.

Mike.

Re: USBasp / er9x / eepe flashing problems

Posted: Thu Jun 06, 2013 2:59 pm
by ShowMaster
Good troubleshooting!
I think this is what's going on.
Did you do the Frsky telemetry mod? I'm assuming not since that moves the throttle cut switch off of the MOSI.
I remember mikeB and others mentioning that the switches on the MOSI and MISO when thrown switch in the 200 ohm resistors to ground on those lines. The 100 ohm or higher resistors in the USBasp programmer lines make a voltage divider and loads the programming lines.
The HK programmer has no series resistors so it can brute force the programming line with the switches adding the 200 ohms to ground.
If the Frsky telemetry mod is done this moves the switches and resistors to pins 41 & 42 off of the MISO & MOSI lines/pins.
Good find!


Sent from my iPod touch using Tapatalk.

Re: USBasp / er9x / eepe flashing problems

Posted: Thu Jun 06, 2013 3:47 pm
by MikeB
Even with the switch the 'correct' way, the 200 ohm resistor has a 0.1uF capacitor to ground at the 'other' end. For fast signals, this acts rather like a connection to ground anyway. I found my STK500 programmer, that doesn't have high drive outputs, could only work at low speeds, taking several minutes to program the M64. I built a buffer circuit using a 74AC08 chip that can drive lots of current. I now program at a very fast rate.

Mike.

Re: USBasp / er9x / eepe flashing problems

Posted: Thu Jun 06, 2013 4:25 pm
by ShowMaster
Good idea mike. Maybe post your circuit for those that need a little muscle from their programmer.
SM


Sent from my iPod touch using Tapatalk.

Re: USBasp / er9x / eepe flashing problems

Posted: Thu Jun 06, 2013 9:05 pm
by ReSt
The radio where I discovered this behaviour does NOT have a telemetry mod.

Reinhard

Re: USBasp / er9x / eepe flashing problems

Posted: Thu Jun 06, 2013 9:12 pm
by MikeB
My buffer curcuit. This stuff is all out there somewhere!

http://www.rcgroups.com/forums/showpost ... count=8581

Mike.

Re: USBasp / er9x / eepe flashing problems

Posted: Thu Jun 06, 2013 9:49 pm
by ShowMaster
Thanks


Sent from my iPod touch using Tapatalk.

Re: USBasp / er9x / eepe flashing problems

Posted: Thu May 30, 2019 10:26 am
by MasAFPV
Thanks for the help - in my case I had to disconnect everything from mainboard to get correct m64 signature.