Flash M128 Turnigy 9x

Where to find parts? Refactoring your entire transmitter, new cases? Sticks etc..
Post Reply
User avatar
akawaoku
Posts: 7
Joined: Wed Oct 31, 2018 10:41 pm
Country: Brazil

Flash M128 Turnigy 9x

Post by akawaoku »

Hi,

I had to change the original Atmega64 from my turnigy 9x and then I installed the Atmega128.
I was able to flash as follow:

Code: Select all

C:\Program Files (x86)\OpenTX\Companion 2.0>avrdude.exe -c usbasp -p m128 -B 100
 -U flash:w:C:/temp/opentx-9x128-frsky-en.hex:i

avrdude.exe: set SCK frequency to 8000 Hz
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware up
date.
avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.07s

avrdude.exe: Device signature = 0x1e9702
avrdude.exe: NOTE: FLASH memory has been specified, an erase cycle will be perfo
rmed
             To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: set SCK frequency to 8000 Hz
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware up
date.
avrdude.exe: reading input file "C:/temp/opentx-9x128-frsky-en.hex"
avrdude.exe: writing flash (50320 bytes):

Writing | ################################################## | 100% 34.22s



avrdude.exe: 50320 bytes of flash written
avrdude.exe: verifying flash memory against C:/temp/opentx-9x128-frsky-en.hex:
avrdude.exe: load data flash data from input file C:/temp/opentx-9x128-frsky-en.
hex:
avrdude.exe: input file C:/temp/opentx-9x128-frsky-en.hex contains 50320 bytes
avrdude.exe: reading on-chip flash data:

Reading | ################################################## | 100% 29.93s



avrdude.exe: verifying ...
avrdude.exe: 50320 bytes of flash verified

avrdude.exe: safemode: Fuses OK

avrdude.exe done.  Thank you.
However after trying to power on the radio, nothing happens.
Somebody has any clue?
Last edited by akawaoku on Thu Nov 01, 2018 7:36 pm, edited 1 time in total.

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

Re: Flash M128 Turnigy 9x

Post by Kilrah »

On a new chip you need to "Reset Fuses".
User avatar
akawaoku
Posts: 7
Joined: Wed Oct 31, 2018 10:41 pm
Country: Brazil

Re: Flash M128 Turnigy 9x

Post by akawaoku »

How can I do that?
User avatar
Kilrah
Posts: 11107
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Flash M128 Turnigy 9x

Post by Kilrah »

Look a bit in the menus... read/write -> fuses
User avatar
akawaoku
Posts: 7
Joined: Wed Oct 31, 2018 10:41 pm
Country: Brazil

Re: Flash M128 Turnigy 9x

Post by akawaoku »

Hi Kilrah,

First of all thanks for your answers.
I just saw some old posts of yours that mention that I should use the the option -B 100 to slower down the clk and if I got the feedback "warning: cannot set sck period. please check for usbasp firmware update." it means that I should try other programmer (could you recommend any one?) .
As you can see at my log I am receiveing this message. But the Companion are not giving any error.
I did not try the configuration via menu yet. I will when got at home.

fxshoppe
Posts: 27
Joined: Sat Sep 08, 2018 3:45 am
Country: India

Re: Flash M128 Turnigy 9x

Post by fxshoppe »

Friend

You need to first burn fuses if you have changed processor.

Then write the firmware, the option you are mentioning is different green chip.

Ignore the usbasp firmware error

Ping me if you need further assistance.

regards
User avatar
akawaoku
Posts: 7
Joined: Wed Oct 31, 2018 10:41 pm
Country: Brazil

Re: Flash M128 Turnigy 9x

Post by akawaoku »

Thanks fxshoppe.

I'll try later and tell you the results.
User avatar
akawaoku
Posts: 7
Joined: Wed Oct 31, 2018 10:41 pm
Country: Brazil

Re: Flash M128 Turnigy 9x

Post by akawaoku »

I just tried the fuses on read/write menu but the companion is not understand that I am trying to write the M128 instead of M64:

Code: Select all

=================================================================================
Started AVRDUDE
C:/Program Files (x86)/OpenTX/Companion 2.0/avrdude.exe -c usbasp -p m64 -U lfuse:r:C:/Users/alvaro/AppData/Local/Temp/5580-ftemp.bin:r
=================================================================================

avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude.exe: Device signature = 0x1e9702
avrdude.exe: Expected signature for ATMEGA64 is 1E 96 02
             Double check chip, or use -F to override this check.

avrdude.exe done.  Thank you.
However I tried the same command with option m128 and got the following messages:

Code: Select all

C:\Program Files (x86)\OpenTX\Companion 2.0>avrdude.exe -c usbasp -p m128 -U lfu
se:r:C:/Users/alvaro/AppData/Local/Temp/9740-ftemp.bin:r

avrdude.exe: warning: cannot set sck period. please check for usbasp firmware up
date.
avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.06s

avrdude.exe: Device signature = 0x1e9702
avrdude.exe: reading lfuse memory:

Reading | ################################################## | 100% 0.02s

avrdude.exe: writing output file "C:/Users/alvaro/AppData/Local/Temp/9740-ftemp.
bin"

avrdude.exe: safemode: Fuses OK

avrdude.exe done.  Thank you.
If I am understanding correctly this command just read the fuses.

What should I do next?
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Flash M128 Turnigy 9x

Post by jhsa »

You have the wrong processor selected.. Select m128 instead of the m64

João

EDIT: And NEVER, BUT NEVER, use the -F option. Unless you want to brick your radio of course. :) ;) :mrgreen:
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
akawaoku
Posts: 7
Joined: Wed Oct 31, 2018 10:41 pm
Country: Brazil

Re: Flash M128 Turnigy 9x

Post by akawaoku »

Hey João,

I did not find any setup up related to processor. Only the "settings" where I can choose the radio (settings->settings) and I did choose the "OpenTX for M128 / 9X board"
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Flash M128 Turnigy 9x

Post by jhsa »

I don't use opentx. I use Er9x, so I am not familiar with companion.
Does it have some setting for radio type or something similar? I think I remember seeing it some time ago when I installed it.
I don't even recall seeing a setting to select the right programmer. For example, I do not normally use an USBASP. I use another one..

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: 11107
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Flash M128 Turnigy 9x

Post by Kilrah »

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

Re: Flash M128 Turnigy 9x

Post by jhsa »

There you go, someone that knows companion way better than I do :mrgreen:

But, how do you enter the avrdude setting. I remember only seeing the option to select the radio.
What confuses me is that I thought companion had all configurations in only one menu, meaning that you select the radio type and all programming options are there.

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: 11107
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Flash M128 Turnigy 9x

Post by Kilrah »

I highlighted the icon in the bottom left...

Yup there is only one selecton for everything - BUT it seems it didn't work for fuses and nobody ever noticed that, the above is a workaround.
Setting fuses isn't a particularly frequent need...
hackerjoe
Posts: 89
Joined: Fri Dec 08, 2017 1:58 am
Country: United States

Re: Flash M128 Turnigy 9x

Post by hackerjoe »

This is where you set it in eePe ---->
eePe.jpg
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Flash M128 Turnigy 9x

Post by jhsa »

He wants to flash OpenTX, not Er9x, so he needs to use companion, not eepe ;)

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
hackerjoe
Posts: 89
Joined: Fri Dec 08, 2017 1:58 am
Country: United States

Re: Flash M128 Turnigy 9x

Post by hackerjoe »

jhsa wrote: Fri Nov 02, 2018 4:10 pm He wants to flash OpenTX, not Er9x, so he needs to use companion, not eepe ;)

João
Yes I realize that, I was just showing where it is in eepe :)
User avatar
Kilrah
Posts: 11107
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Flash M128 Turnigy 9x

Post by Kilrah »

When someone needs help posting stuff that's not relevant to the question usually serves little purpose and just risks confusing the OP.
User avatar
akawaoku
Posts: 7
Joined: Wed Oct 31, 2018 10:41 pm
Country: Brazil

Re: Flash M128 Turnigy 9x

Post by akawaoku »

Thanks a lot.
But I think I made a mistake and got a short circuit between the vcc pin a the one just next, than I burnt out a track that will be hard to fix because is under the processor.

Again, thank you guys.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Flash M128 Turnigy 9x

Post by jhsa »

Can you please post a good picture of it??

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

Post Reply

Return to “Hardware Mods”