9XR flashing with USBASP issues!

openTx has introduced a range of new features, ideas and bling. It is fast becoming the firmware of choice for many users. openTx will run on ALL current hardware platforms, including the gruvin9x and sky9x boards. Work has already started to support the new FrSky X9D radio!
Post Reply
TW882
Posts: 8
Joined: Sun Jan 06, 2019 5:08 pm
Country: Europe

9XR flashing with USBASP issues!

Post by TW882 » Sun Jan 06, 2019 5:19 pm

Hi, so im trying to flash openTx onto my 9XR with the usbasp programmer but I think it appears as though the usbasp isn't connected correctly to the 9XR and its giving me this error when I try to do any function with companiontx or eepe such as read firmware or read models.
=================================================================================

avrdude.exe: error: programm 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.


avrdude.exe done. Thank you.


=================================================================================

I have installed the drivers for the usbasp with zadig and there didnt seem to be any errors there. The usbasp that im using is the "lc technology usbasp v2.0". The radio is getting power from the programmer so I believe the 6 pin cable is in the correct orientation. Ive also verified that the usbasp is outputting 4.5-5v on the logic pins.
So im a bit stuck on where to go next with this....

Toby


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

Re: 9XR flashing with USBASP issues!

Post by Kilrah » Sun Jan 06, 2019 7:07 pm

Are you supplying proper power to the radio? Power from the programmer typically isn't enough.

TW882
Posts: 8
Joined: Sun Jan 06, 2019 5:08 pm
Country: Europe

Re: 9XR flashing with USBASP issues!

Post by TW882 » Sun Jan 06, 2019 7:40 pm

the radio becomes powered on when I plug the programmer in, and all of the menus are accessible, so I would assume its powered correctly.

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

Re: 9XR flashing with USBASP issues!

Post by Kilrah » Sun Jan 06, 2019 7:41 pm

It is not, you also need a battery installed and power switch on. Flashing on programmer power only is known to be insufficient and potentially render the processor unusable.

TW882
Posts: 8
Joined: Sun Jan 06, 2019 5:08 pm
Country: Europe

Re: 9XR flashing with USBASP issues!

Post by TW882 » Sun Jan 06, 2019 7:58 pm

Ok so ive just tried it with the battery in, and powered on, seems to be giving the same problem.
However, the first time the programmer is plugged into the pc and I try to read the firmware, I get this message
avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude.exe: Device signature = 0x1e9702
avrdude.exe: current erase-rewrite cycle count is -50462977 (if being tracked)
avrdude.exe: reading flash memory:

Reading | ################

when it finishes reading, the file it generates cannot be opened.


User avatar
jhsa
Posts: 18850
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: 9XR flashing with USBASP issues!

Post by jhsa » Mon Jan 07, 2019 12:25 am

Where are you trying to open the file?

João
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
Kilrah
Posts: 10048
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: 9XR flashing with USBASP issues!

Post by Kilrah » Mon Jan 07, 2019 8:41 am

The resulting file is a firmware, not a settings document, it's normal you can't open it with companion.

TW882
Posts: 8
Joined: Sun Jan 06, 2019 5:08 pm
Country: Europe

Re: 9XR flashing with USBASP issues!

Post by TW882 » Mon Jan 07, 2019 4:08 pm

Alright ok I didn't quite get that thanks for clarifying,
It seems as though it is the same error for the other functions though, such as trying to read the models and settings and when trying to flash the firmware to the radio. It still appears as though the usbasp is not connected correctly to the transmitter. I read on another forum about a particular resistor pack causing problems when trying to flash the 9xr, could this be my issue?

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

Re: 9XR flashing with USBASP issues!

Post by Kilrah » Mon Jan 07, 2019 6:13 pm

Yep certain usbasp programmers do cause issues, especially the ones with the 4-pack resistor.

Been a long time since I touched a 9X(R)..

ReSt
Posts: 1512
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: 9XR flashing with USBASP issues!

Post by ReSt » Mon Jan 07, 2019 7:02 pm

There normally is a small smd resistor pack between the processor and the output pins of the board with 4 resistors (8 pins) that is marked with "101" that is 100 Ohm. These are (normally) ok. The problematic resistor packs were marked 102, that is 1kOhm, IIRC
Another possibility for problems sometimes is the position of (at least) the throttle switch. Some of the switches, depending on their position (ON/OFF) may put an additional load onto one or another signal of the USBASP, as they are connected to the same pins. This additional load can pull signals furthermore down. Try with all switches down/away from you.

And one WARNING !!!
Do NOT, NEVER use the -F option of avrdude to try to overcome the problems. Trying this option has a high chance of bricking your radio.

Reinhard

TW882
Posts: 8
Joined: Sun Jan 06, 2019 5:08 pm
Country: Europe

Re: 9XR flashing with USBASP issues!

Post by TW882 » Mon Jan 07, 2019 8:04 pm

Ok, no luck when trying with the switches down/in different positions.
Ive just checked my programmer against its schematic and with a multimeter, and it seems as though I don't have any resistors between the 6 pin connector and MISO/MOSI/SCK/RESET. Maybe I will try to update the firmware on the usbasp if I can as it was a cheap one from amazon.
Thanks for the help.

ReSt
Posts: 1512
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: 9XR flashing with USBASP issues!

Post by ReSt » Mon Jan 07, 2019 10:35 pm

One mor possibility.
Try to slow down the communication speed of AVRDude
In opentx companion in settings - Configure Communications... in the "Extra Arguments" field use the parameter
-b xxxxx
This overrides the baudrate that is used. (if I remember correctly then the lowest value I have read of is -b 100)
I don't know what values you can use, but try to search for it in the forum.

Reinhard

User avatar
jhsa
Posts: 18850
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: 9XR flashing with USBASP issues!

Post by jhsa » Mon Jan 07, 2019 11:33 pm

I think it is -B100 instead of -b100.. :) There is a difference between the two of them.. :)
João
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

ReSt
Posts: 1512
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: 9XR flashing with USBASP issues!

Post by ReSt » Tue Jan 08, 2019 8:39 am

You may be right.

and there is a difference, as you say.

According to the help display from Preferences in eePe
-b <baudrate> Override RS-232 baud rate
-B <bitclock> Specify JTAGS/STK500v2 bit clock period (us).

I don't know which one is the one to be used. I only remember that a low number was suggested to slow down, and a low number at bitclock would probably speed up ??
But I think, communication is done via the JTAG/STK interface and so -B is the more probable one.

Reinhard

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

Re: 9XR flashing with USBASP issues!

Post by Kilrah » Tue Jan 08, 2019 9:59 am

It's -B. As mentioned that specifies period so a bigger one means lower freq.

ReSt
Posts: 1512
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: 9XR flashing with USBASP issues!

Post by ReSt » Tue Jan 08, 2019 12:57 pm

Searching the forum, I found suggestions of -B100 up to -B10000

Reinhard

User avatar
jhsa
Posts: 18850
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: 9XR flashing with USBASP issues!

Post by jhsa » Tue Jan 08, 2019 2:23 pm

-B100 is a good start and got me out of trouble a couple times :)

João
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

TW882
Posts: 8
Joined: Sun Jan 06, 2019 5:08 pm
Country: Europe

Re: 9XR flashing with USBASP issues!

Post by TW882 » Tue Jan 08, 2019 7:20 pm

Ahh fantastic, seems like the -B100 parameter has done some good. I tired -B10000 also however it didn't work. I am now able to complete a read/write process which is great... but when companion has finished flashing firmware, the radio seems to have the original firmware still :o .
Andddd when reading models and settings from the tx, I get an error in companion saying 'eeprom size is invalid' and 'eeprom file system is invalid'
Thanks for the help on the communication speed.

User avatar
jhsa
Posts: 18850
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: 9XR flashing with USBASP issues!

Post by jhsa » Wed Jan 09, 2019 1:14 am

Please try flashing your radio with er9x and see if it makes any difference. You find it at www.er9x.com
Make sure you download the right version for your radio's processor..
Also, download and install "eepe" which is the eeprom editor for er9x.
go to the "Burn menu / configure" and select your programmer, com port and the correct radio processor.
Also in "File/Preferences" select the right processor.
All the rest should be the same as with companion.
Before all this, please backup your radio's firmware and eeprom using companion, if you have any models that you don't want to lose..

João
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

TW882
Posts: 8
Joined: Sun Jan 06, 2019 5:08 pm
Country: Europe

Re: 9XR flashing with USBASP issues!

Post by TW882 » Wed Jan 09, 2019 7:44 pm

Thanks everyone so much for the help, yes, flashing with eepe to er9x and using -B100 seems to have done the job, strange that companion didn't seem to work. Ill keep playing around and post if I manage openTx.

User avatar
jhsa
Posts: 18850
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: 9XR flashing with USBASP issues!

Post by jhsa » Wed Jan 09, 2019 8:22 pm

Funny, if it worked with er9x, it should have worked also with openTX, unless there is a problem with it or companion.
Unfortunately the openTX team seems not to be supporting radios with AVR processors anymore so I wouldn't be surprised if something was broken. Er9x is still being maintained and also supports more features like for example the multiprotocol module over serial..

João
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

TW882
Posts: 8
Joined: Sun Jan 06, 2019 5:08 pm
Country: Europe

Re: 9XR flashing with USBASP issues!

Post by TW882 » Thu Jan 10, 2019 8:04 am

Ok, so Ive now managed to get openTx working through eepe :D but yes, it looks like er9x have many more features on my radio so I will switch back to that. Companion now seems to be able to flash the radio but still isn't liking models and settings so I think I will just stick to using eepe too.

ReSt
Posts: 1512
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: 9XR flashing with USBASP issues!

Post by ReSt » Thu Jan 10, 2019 8:46 am

Sometimes it helps flashing, when the cable between programmer and the processor of the radio is as short as possible.

Reinhard

User avatar
jhsa
Posts: 18850
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: RE: Re: 9XR flashing with USBASP issues!

Post by jhsa » Thu Jan 10, 2019 11:13 am

TW882 wrote:Ok, so Ive now managed to get openTx working through eepe :D but yes, it looks like er9x have many more features on my radio so I will switch back to that. Companion now seems to be able to flash the radio but still isn't liking models and settings so I think I will just stick to using eepe too.
Well, it might be that as I said something is broken in Companion concerning the AVR radios.
I think I have read that the support for these processors was actually removed from latest Companion???

João

Sent from my BLN-L21 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


Post Reply

Return to “openTx”