USBasp / er9x / eepe flashing problems

Post Reply
metalfred
Posts: 1
Joined: Sun Jan 13, 2013 2:34 pm
Country: -

USBasp / er9x / eepe flashing problems

Post 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.

User avatar
Kilrah
Posts: 11111
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: USBasp / er9x / eepe flashing problems

Post 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
User avatar
Scott Page
Posts: 864
Joined: Wed Dec 28, 2011 3:32 am
Country: United States
Location: Tri-Cities, Washington State

Re: USBasp / er9x / eepe flashing problems

Post 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.
ReSt
Posts: 1596
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: USBasp / er9x / eepe flashing problems

Post 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
User avatar
MikeB
9x Developer
Posts: 18056
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: USBasp / er9x / eepe flashing problems

Post 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.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

User avatar
ShowMaster
Posts: 4327
Joined: Thu Dec 29, 2011 3:44 am
Country: -
Location: Los Angeles, CA USA

Re: USBasp / er9x / eepe flashing problems

Post 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.
User avatar
MikeB
9x Developer
Posts: 18056
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: USBasp / er9x / eepe flashing problems

Post 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.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
ShowMaster
Posts: 4327
Joined: Thu Dec 29, 2011 3:44 am
Country: -
Location: Los Angeles, CA USA

Re: USBasp / er9x / eepe flashing problems

Post 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.
ReSt
Posts: 1596
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: USBasp / er9x / eepe flashing problems

Post by ReSt »

The radio where I discovered this behaviour does NOT have a telemetry mod.

Reinhard
User avatar
MikeB
9x Developer
Posts: 18056
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: USBasp / er9x / eepe flashing problems

Post by MikeB »

My buffer curcuit. This stuff is all out there somewhere!

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

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
ShowMaster
Posts: 4327
Joined: Thu Dec 29, 2011 3:44 am
Country: -
Location: Los Angeles, CA USA

Re: USBasp / er9x / eepe flashing problems

Post by ShowMaster »

Thanks


Sent from my iPod touch using Tapatalk.
MasAFPV
Posts: 1
Joined: Thu May 30, 2019 10:24 am
Country: -

Re: USBasp / er9x / eepe flashing problems

Post by MasAFPV »

Thanks for the help - in my case I had to disconnect everything from mainboard to get correct m64 signature.

Post Reply

Return to “PROGRAMMERS”