Problem flashing er9x using eepe to Turnigy 9XR

er9x is the best known firmware. It has a superb range of features and is well supported by the community. Well worth trying out.
Post Reply
sk8man101
Posts: 12
Joined: Wed Nov 13, 2013 4:48 am
Country: -

Problem flashing er9x using eepe to Turnigy 9XR

Post by sk8man101 »

Hello, I'm looking for some help on flashing my 9xr to have er9x and ive been trying to use the eepe. I initially had a lot of issues with using my USBASP from hobby king and I couldnt get the driver to load on my WIN 7 ultimate 64bit. I got that sorted out and can use it when I boot I hit f8 and choose to disable driver signatures. I have used this particular usbasp from hobbyking to flash my kk2 using a friends mac and there was no problem. however this time I was using eepe and the latest version of er9x about half way through the process and the usbasp sounded like it became disconected (the windows sound du duh) and the process was stopped short... Well i obviously got an error from avr dude saying it did not finish correctly... and now my 9xr seems to be bricked - meaning that disconnected from any computer when I power it on only the "READY!" light lights up and there are no beeps and no lights or anything coming from the lcd screen. I tried again to use eepe to load the firmware but no luck. I was able to read the tx before the error and made a copy of my OEM just in case. after somemore research I heard that the first batch of usbasp from HK were defective. I have a new usbasp from ebay and have tried it as well. now all I get is a message from avrdude that says

avrdude.exe:error:program enable target doesn't answer. 1
avrdude.exe: initialization failed, rc=-1
Double check connections and try again, or use -F to override this check

I have double checked to make sure the usbasp is working properly using some utilities found where i downloaded the driver like "testlibusb" and it seems to be working and I have also checked to make sure that the config menu is set up correctly
Programmer - usbasp
mcu - m128 - I found out this earlier that I have to use this setting because of my chip in my radio
port - usb
I grabbed some screen shots with my phone during the initial try to load the soft ware because I was excited that it was finally working and this is what it said -
avrdude: Device signature = 0x1e9702
avrdude: NOTE : FLASH memory has been specified, and erase cycle will be performed
To disable this feature, specify the -D option
avrdude: erasing chip
avrdude: reading inputfile "/er9x.hex"
avrdude writing flash (54594 bytes):

Writing [ ################################################################################ ] 100% 29.20s
avrdude: 54594 bytes of flash written
avrdude: verfying flash memory against /er9x.hex:
avrdude: load data flash data from input file /er9x.hex:
avrdude: input file /er9x.hex contains 54594 bytes
avrdude: reading on-chip flash data:

Reading [ ################################################################################ } 100%

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x8000
0xe0 != 0xff
avrdude: verification error; content mismatch

avrdude done. Thank you.

AVRDUDE done - exit code 1
then a win poped up that said "AVRDUDE did not finish correctly"
I clicked OK and right about here is where the du duh sound came in.

Sorry for the long post but I wanted to supply all the info I could. I have been digging on this for a couple of days with little heplful info. any links or Info that you can provide would be helpful!

User avatar
KAL
Posts: 552
Joined: Thu Oct 10, 2013 4:36 pm
Country: Germany
Location: somewhere near Rothenburg ob der Tauber

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by KAL »

I had a similar problem some days ago while flashing a Turnigy Aquabox.
After a few faulty trials with verification errors I realized that the output voltage of the USBASP was set to 3.3V
After setting the voltage to 5V all went OK.
( TH9X / 9XTreme / FrSky DHT / Spektrum / Multi / RotEnc )
( 9XR PRO / erSKY9x  / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )
User avatar
ShowMaster
Posts: 4327
Joined: Thu Dec 29, 2011 3:44 am
Country: -
Location: Los Angeles, CA USA

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by ShowMaster »

Good idea, low voltage. Please post a closeup picture of you programmer so the resistor pack is visible. Also check the 5 volts from the programmer to your 9xr when you attempt to program. It shouldn't drop below 4.5v let's say with no drop being normal.
Many USBasp programmers have a 200 ohm resistor pack or higher value in series with the programing lines. This must be 100 (101) ohms or just shorted pads and no resistors for reliable programming. The older HK USBasp programmers had only shorted pads and worked every time. Them they went to a version that didn't work. I understand that's been corrected but I haven't seen any pictures of the board. The eBay programmers are a hit and miss and can have various values.
There is a member that sells a inexpensive programmer on eBay that works well.
So...
Measure you 5v output pin while pogroming and look at the resistor pack values next to the output connector.
ImageUploadedByTapatalk1384724587.264491.jpg
ImageUploadedByTapatalk1384724676.863576.jpg
I hope this info is helpful.
User avatar
ShowMaster
Posts: 4327
Joined: Thu Dec 29, 2011 3:44 am
Country: -
Location: Los Angeles, CA USA

Problem flashing er9x using eepe to Turnigy 9XR

Post by ShowMaster »

I reread your post and see your programmer has worked.
The fact that your programmer worked when programming another device tells us it's not defective. Assuming your drivers are all ok it does seem to point to a low programming 5v out or the higher value resistor pack.
I also repaired a programmer for a friend that had a resistor in place of what's labeled F1. It dropped 2+ volts across it when loaded during programming. A jumper across it fixed the programmer.
Btw, it bricked his processor so bad I replaced it for him and he's good to go.
ReSt
Posts: 1593
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by ReSt »

Another point to watch out, it looks like you have been using the basic er9x version that is good for the M64 processor.

You should use the "er9x-128.hex" version for flashing your radio.

Reinhard

sk8man101
Posts: 12
Joined: Wed Nov 13, 2013 4:48 am
Country: -

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by sk8man101 »

Thank you all for your replies! I have checked the voltage and it reads 5.12v not pluged into the radio and 4.99-4.98v when pluged into the radio. when I hit ok to flash the radio the voltage only drops maybe .01v. My usbasp looks similar to the one you pictured above and it appears to have the resistor 101 that you mentioned. I have attached a couple of pics of mine below that I got from ebay. And I also tried the new er9x-128.hex with the same issue. Is that maybe why I got the error and the end of the original time I flashed my radio because i was using the standard er9x?
close up 1.JPG
and here is the 10 to 6 adapter that the new one came with
close up 2.JPG
close up 2 backside.JPG
Thanks again!
User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by rperkins »

sk8man101 wrote: avrdude: verification error, first mismatch at byte 0x8000
Is this on mac or windows?
what version of avrdude?
Is this the error you get now or are you getting 'target doesnt answer.?

To recap:
1. Was using hk usbasp, not the one pictured. Programing failed
2. Unit appears dead. Nothing on lcd. Only the power light comes on.
3. Now you are getting 'target doesnt answer'
4. Using betemcu.cn usbasp as pictured and verified 101 resistor pack.
User avatar
Mach
Posts: 8
Joined: Sat Oct 05, 2013 10:03 pm
Country: -

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by Mach »

I also ran into a similar situation some time ago... It failed and once I powered it off and back on it was stone dead..

I followed the procedure below and now works great..

http://er9x.googlecode.com/svn/trunk/do ... 0Brick.pdf

It doesn't seem to redirect correctly...

Here's the link
"http://er9x.googlecode.com/svn/trunk/do ... 0Brick.pdf"

I used an arduino to generate the 1mhz clock signal needed to start my M64, I assume it's the same procedure for the M128,

BTW I was using a spark fun pocket avr programmer on Windows 8. And an arduino Uno v3

Sent from my Galaxy S4 Active
sk8man101
Posts: 12
Joined: Wed Nov 13, 2013 4:48 am
Country: -

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by sk8man101 »

rperkins,
this is on a win 7 ultimate 64bit laptop
avrdude.conf,v 1.10 2012-11-08
most of the time I get the "target doesn't answer" error
recap
1 - used the HK usbasp and programming semed to go all the way through and got the error at the end
2 - Unit does appear dead or "Bricked" only the power light turns on
3 - now yes I get the "target doesn't answer" error from avrdude
4 - Yes even when I try with the new usbasp with the 101 resistor i still have the same error

Mach,
Thank you for the link! This seems like an interesting way to try and restart the "heart" of my rx. I am not real familiar with avrdude so I will read up on it later and try it out. Also will do some research on the clock speed of the M128.

I went ahead and ordered a new main board from HK. Its only like 7.50 plus shipping so i figured it might be nice to have a back up!
User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by rperkins »

well your avrdude appears newish by the .conf file. to get the actual version run 'avrdude -v' . the version may have played a part when you got the 'first mismatch at byte 0x8000', but it isnt an issue now. I wouldnt worry about that right now. ( the 0x8000 mismatch usually indicates old version of avrdude on a mac or a really old version on win/linux) the kk board may have not been struck by the problem if the size of the firmware upgrade was smaller

the replacement mainboard is a cheap solution.

If you decide to revive your original board you can probably use your HK usbasp as the external clock source. You would first have to reprogram the HK usbasp with the betemcu.cn usbasp. basically you would use one of the usbasp's as the 'arduino' as mentioned above by 'Mack'

you could also reprogram one of the usbasp's with open source usbasp firmware which would allow you to slow down the programming speed using the '-B' option to avrdude. There are posts on this forum on how to accomplish that. sometimes the external clock is not needed if you slow down the programming speed far enough to reset the fuses. IF you wish to go this route and get stuck just respond as such.

good luck
sk8man101
Posts: 12
Joined: Wed Nov 13, 2013 4:48 am
Country: -

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by sk8man101 »

Thanks everyone for all the helpful info. Some of these options I feel are just above my skill level as far as programming goes but hey thats how we learn right! I will do some more research and try out the arduino option to get the clock going since i did the "slow boat" shipping method from HK and its about to get cold for a while here in Texas. Probably going to run to radio shack and see what they have. I have only messed with arduino once but just coppied a code. It was for the head tracker that actually works really good! I will report back and let you all know if it was sucessful

Thanks Again!

D
User avatar
Mach
Posts: 8
Joined: Sat Oct 05, 2013 10:03 pm
Country: -

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by Mach »

Here's the code for the arduino. Just upload this to the arduino and use pin 9 for the 1mhz clock signal and connect ground from the arduino to the transmitter

here's the code for the Arduino
found here
http://forum.arduino.cc/index.php/topic,103370.0.html

//----------------------------------------------------------------------------------------
//Use Timer/Counter1 to generate a 1MHz square wave on Arduino pin 9.
//J.Christensen 27Apr2012

void setup(void)
{
DDRB = _BV(DDB1); //set OC1A/PB1 as output (Arduino pin D9, DIP pin 15)
TCCR1A = _BV(COM1A0); //toggle OC1A on compare match
OCR1A = 7; //top value for counter
TCCR1B = _BV(WGM12) | _BV(CS10); //CTC mode, prescaler clock/1
}

void loop(void)
{
}
//----------------------------------------------------------------------------------------

I soldered a wire from arduino ground to the TX ground then held the wire from arduino pin 9 to the crystal shown in the picture. Once I was connected I sent the command to reset the fuses, once the command was sent I then retried flashing and everything worked great after that ;-)

Sent from my Galaxy S4 Active
Attachments
uploadfromtaptalk1385317144210.jpg
backman8571
Posts: 37
Joined: Tue Dec 17, 2013 8:22 pm
Country: -

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by backman8571 »

I have the Turnegy 9XR and the FrSky XJT module and receiver

I just ordered the us be programer/dongle

Where can i find the open software for telemetry

And a place with good manual or step by step procedure for how to flash the unit so i can use the onscreen telemetry

A couple of guys are using the 9XR with only fw mod's

Rhanks for all your help to get it to work

Regards

Per
User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by rperkins »

Hello
Welcome to the forum

the wiki is a good place to start for help.
There are several ways to accomplish telemetry, so keep that in mind. Also I dont have the telemetry mod so cant be of much assistance besides pointing you in the right direction.

may I advise that you start a new thread for your questions. It will be less confusing and you will get better assistance.
good luck

http://openrcforums.com/wiki/index.php/Main_Page

http://openrcforums.com/wiki/index.php/ ... _telemetry

https://opentx.googlecode.com/files/9x_ ... ons_EN.pdf
backman8571
Posts: 37
Joined: Tue Dec 17, 2013 8:22 pm
Country: -

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by backman8571 »

This mod's are for the (X and a new din for the flasher

The 9XR has a 6 pin port already there

And from what i heard the main board is different and for instance you can not take the 9XR board and put it in instead of the 9X main board

So what mod procedure is there to use, anyone ??

Per
sk8man101
Posts: 12
Joined: Wed Nov 13, 2013 4:48 am
Country: -

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by sk8man101 »

Uugg! Got the new main board, used the new programmer and did it on a Mac, dead again. This time it's different though. Avrdude goes through the whole process and says it is writing 55492bytes then when it goes to read it seems to work. Then verifying... I get a verification error, first mismatch at byte 0x8000 0xcf != 0xff. Reading above this could be due to an old version of avrdude on a Mac so I am looking up how to update that.

FYI both the older Hobby King and the newer eBay USBasp work on the Mac and both seem to be able to write to BOTH the old and new main boards. When I try using my original PC with windows 7 64 bit the new eBay USBasp and either of the boards I get the "target doesn't answer" error.

The original Hobby King USBasp is very fineacky on my PC. It can only be plugged into one USB port for the device manager to recognize it. Any of the other two and it doesn't even know WHAT it is much less what driver to use. And when it is plugged into the correct spot and the computer recognizes it, it is constantly loading and unloading itself. Meaning it acts like I am unplugging and plugging it back in every 45 seconds or so. I'm not wanting to sque this post off on some tangent about why my original USBasp from hobby king is doing that but rather try and provide as much info as I can for the next person to read looking for answers

As always I will keep trying and if you guys have any input it would be greatly appreciated. I'm going to order 2 more boards (sure wish they were in the US Wherehouse!) and save one for flying and test on the other three. If I can get them all working I guess I'll have good backups!

I will update again after Christmas
Thanks
Dallas
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by Kilrah »

Are you powering the board from its own power?
If you're powering it from usb through the usbasp it could explain the problems with the supply being borderline on one computer and just too low on another.
So remove the power jumper on the usbasp if there's one and power the radio on with its battery.
sk8man101
Posts: 12
Joined: Wed Nov 13, 2013 4:48 am
Country: -

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by sk8man101 »

I was powering the board from the USBasp. The HK USBasp has a jumper but the Ebay one does not. I removed the Jumper on the Hk USBasp and tried it again with the radio being powered by the LiPo. Same Results on the MAC with the same mismatch error towards the end. I will post some screen shots. I used some jumper wires for the Ebay USBasp to isolate the voltage. Same results on the MAC and but on the PC I get an error right away of target does not answer. My PC will not recognize the HK USBasp as I said above so that is not an option :/ Really getting bummed out. This software looks awesome and I'm really wanting to try it out. But I haven't given up yet! I'm getting myself a new Dell laptop with Windows 8 on it for Christmas! (would like a MAC but at three times the price I can't!) so maybe that will solve everything... ooorrrrr make a new list of issues to deal with! I need more experience with a MAC. I can't figure out how to tell if I have an up to date version of AVRDude and I have uninstalled eepe and re installed but it keeps telling me that I need to update to the newest version (r391) running the r339 right now on the MAC and the r391 on the PC. Thanks again for the thoughts
sk8man101
Posts: 12
Joined: Wed Nov 13, 2013 4:48 am
Country: -

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by sk8man101 »

Here's a couple of screen shots taken with my phone
Attachments
Error from the MAC at the end of the AVRDude load
Error from the MAC at the end of the AVRDude load
screen shots from the MAC during the process
screen shots from the MAC during the process
sk8man101
Posts: 12
Joined: Wed Nov 13, 2013 4:48 am
Country: -

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by sk8man101 »

and in case you noticed the file name of the .hex file being er9x128101 I had to copy and paste the contents directly from the website to an existing copy because I could not get the mac to save the .hex file in text format. It kept saving as a java based page and not just the code. I wouldn't think that the file name would have anything to do with it. I found this out when I would try to load and I would get an error of something like "no end file" so I opened the .hex file and noticed it was basically a copy of the whole page and not just the code.
backman8571
Posts: 37
Joined: Tue Dec 17, 2013 8:22 pm
Country: -

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by backman8571 »

Try to use companion instead.

Companion will download a proper fm file for what you looking for, after that try flashing again, i did that and it worked for me eepe dont work for me, i am running windows 8

Per
User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by rperkins »

sk8man101 wrote: avrdude: verification error, first mismatch at byte 0x8000
this 0x8000 error is sometimes a mac error due to an old version of avrdude.
that is why I asked what OS you were using and you stated windows, but now it seems you are back on mac.

It appears you have 2 programmers. You can hook your two programmers together using one as the usbasp and set the programming jumper on the second one and attempt avrdude READ commands on the programmer used as a target. Then switch the programmers making the second one the usbasp and first one the target. dont forget to move the programming jumper. this will test the basic function of your usbasp's and the connecting cable. This will not fix the 0x8000 error on the mac. I think you mentioned that you dont know how to find out the version of avrdude but I think I mentioned it above. try avrdude -v from the command line.

did a forum search on "0x8000 mac" and found the thread in which I am using to draw my conclusions
http://openrcforums.com/forum/viewtopic ... mac#p58027

Happy new year everybody !!!
sk8man101
Posts: 12
Joined: Wed Nov 13, 2013 4:48 am
Country: -

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by sk8man101 »

Ok I have an update for everybody. So after much issues as you have seen above I have decided that it is an issue with my original windows 7 PC and more specifically the USB ports on that PC. It is a Toshiba by the way. I took my newest board to a friends house and we were able to flash it right away using his win 7 machine 64 bit and the exact same USBasp that I have from Hobbyking. Also, I have a new Dell Laptop running Win 8.1 and I can flash BOTH boards with no problems using the HK USBasp and a driver that I found here - http://www.protostack.com/accessories/u ... programmer - Everything is working great and I am able to read and write to my TX! VERY HAPPY! So my only fix was to get a new PC! not very cost effective but that was the only fix I could find and I needed a new PC anyways. FYI this is not even a reason that I bought a new PC just a coincidence! Thank you every one for your help with this issue and if your reading this with the same problem I had I'm sorry that I didn't find a better solution. PS - ER9X and the eepe program are AWESOME!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by jhsa »

sk8man101 wrote: FYI this is not even a reason that I bought a new PC just a coincidence!
;) :mrgreen:

Sent from my GT-I9195 using Tapatalk
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Problem flashing er9x using eepe to Turnigy 9XR

Post by rperkins »

ShowMaster wrote: Many USBasp programmers have a 200 ohm resistor pack or higher value in series with the programing lines. This must be 100 (101) ohms or just shorted pads and no resistors for reliable programming.
I have had 2 customers since Christmas 'think' they had this issue and unsoldered the pack. This issue is sort of outdated.

Unless you purchase a Usbasp from an ebay seller that has stock that is older than 9 months, you probably wont have this issue. If your betemcu.cn has all the components on one side, you do not have this issue. If you purchased from http://9xrprogrammer.com or user 9xrprogrammer on ebay, you do not have this issue.

it should also be mentioned that the OP's problem in this case was not the resistor network but it was good of Showmaster to mention it.
Only if your programmer's resistor network is marked something other than '101' will you have this issue

Post Reply

Return to “er9x”