ATmega2561 support in openTx

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

Re: ATmega2561 support in openTx

Post by MikeB »

The test version of er9x-2561 should support voice:
http://openrcforums.com/forum/viewtopic ... 561#p58477

It should make it to the repository on the next revision.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

User avatar
mbanzi
Posts: 223
Joined: Thu May 24, 2012 5:53 am
Country: -
Location: San Diego, CA

Re: ATmega2561 support in openTx

Post by mbanzi »

MikeB wrote:The test version of er9x-2561 should support voice:

It should make it to the repository on the next revision.

Mike.
Thanks Mike, I'll test both OpenTx & er9x once I have the voice module installed.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: ATmega2561 support in openTx

Post by jhsa »

Thanks guys..

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
mbanzi
Posts: 223
Joined: Thu May 24, 2012 5:53 am
Country: -
Location: San Diego, CA

Re: ATmega2561 support in openTx

Post by mbanzi »

MikeB wrote:The test version of er9x-2561 should support voice:

Mike.
Just installed the voice interface in the m2561 transmitter & she's loud (actually VERY loud) with er9x-2561. Is it just me or is the voice a lot louder on er9x? I like the MegaSound sound mode option BTW!

I have the OpenTx numbered sound files on the microSD card, so the voice doesn't make sense at all, but works well. Beeper & Haptic also work, as does the backlight through the voice interface. It's getting late, so I'll test telemetry & the rest tomorrow.

As soon as Bertrand gets a voice version of OpenTx to me, I can wrap up the testing.
User avatar
mbanzi
Posts: 223
Joined: Thu May 24, 2012 5:53 am
Country: -
Location: San Diego, CA

Re: ATmega2561 support in openTx

Post by mbanzi »

Anyone know why I can't back up & restore my EEPROM after flashing? I get the "Bad EEprom Data" every time, and it's a PITA the enter the models using the buttons...

Using:

Code: Select all

avrdude.exe -c usbasp -p m2561 -P usb -U eeprom:r:m2561_eeprom.bin:r
avrdude.exe -c usbasp -p m2561 -P usb -U eeprom:w:m2561_eeprom.bin:r

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

Re: ATmega2561 support in openTx

Post by Kilrah »

I seem to remember that the firmware that is on most USBASPs had trouble with at least the 2560 and fails to access the eeprom correctly, probably the 2561 too ...
There is a patched version somewhere that Romolo posted.

EDIT: Do you mean the error is from the USBASP and also present in case of "raw" backup (read/write to file), or from C9X?
The answer above would apply to the first case. I don't think C9X actually supports the 2561's eeprom format yet. FW must be well tested and working first.
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ATmega2561 support in openTx

Post by MikeB »

The next revision of eepe should support the '2561. My testing used my STK500 however with the '2561 in the STK501 top board.
I successfully read the EEPROM.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
mbanzi
Posts: 223
Joined: Thu May 24, 2012 5:53 am
Country: -
Location: San Diego, CA

Re: ATmega2561 support in openTx

Post by mbanzi »

The fuses for the m2561 are quite different from the m64/m128. I'm currently using the fuses I got from mhotar:

Code: Select all

-U lfuse:w:0xd7:m -U hfuse:w:0x99:m -U efuse:w:0xfc:m
MikeB suggested I disable JTAG that otherwise upsets some of the A2D signals, and I'm going to try preserve the EEPROM:

Code: Select all

-U lfuse:w:0xd7:m -U hfuse:w:0xd1:m -U efuse:w:0xfc:m
Can someone validate the fuse settings to make sure I'm ok? More specifically, is the clock setting

"Full Swing Oscillator; Start-up time: 16K CK + 0 ms; Crystal Osc.; BOD enabled; [CKSEL=0111 SUT=01]"

ok versus the m64/m128

"Ext. Crystal/Resonator High Freq.; Start-up time: 258 CK + 4 ms; [CKSEL=1110 SUT=00]"
User avatar
mbanzi
Posts: 223
Joined: Thu May 24, 2012 5:53 am
Country: -
Location: San Diego, CA

Re: ATmega2561 support in openTx

Post by mbanzi »

Kilrah wrote:I seem to remember that the firmware that is on most USBASPs had trouble with at least the 2560 and fails to access the eeprom correctly, probably the 2561 too ...
There is a patched version somewhere that Romolo posted.

EDIT: Do you mean the error is from the USBASP and also present in case of "raw" backup (read/write to file), or from C9X?
The answer above would apply to the first case. I don't think C9X actually supports the 2561's eeprom format yet. FW must be well tested and working first.
My USBASP's firmware are all patched with Romolo's version, so they work fine with no errors. I use avrdude directly, as eepe/companion don't support the 2561 yet. I do a raw read & write, but when I turn on the transmitter, I get the EEPROM error.

EDIT: I'm the one testing the m2561 firmware!!! :mrgreen:
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ATmega2561 support in openTx

Post by MikeB »

Just read my fuses on the '2561:
Low 0xDE
High 0xD1
Ext: 0xFF

0xFC for the extended setting would make more sense (BOD at 4.3V)

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ATmega2561 support in openTx

Post by MikeB »

Here is my current test version of eepe:
eepe2561.zip
(769.18 KiB) Downloaded 369 times
You can select the m2561 in the burn|configure dialog. The EEPROM will appear flagged as (m128) as the size and structure is the same.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
mbanzi
Posts: 223
Joined: Thu May 24, 2012 5:53 am
Country: -
Location: San Diego, CA

Re: ATmega2561 support in openTx

Post by mbanzi »

Today I managed to test OpenTx-m2561 pretty thoroughly. I tested models with PPM (FlySky), FrSky & my DIY DX4e DSM module and everything worked perfectly. No problems found with Sound, Voice & Haptic. I've spent at least 2 hours total flying (mostly indoors with the micro quad) without a single issue. I'll create a Wiki with all the details on the conversion soon. I know mhotar has been testing too, but it would be better if as many people as possible with different setups tried it. In my opinion it's ready to go!

Tomorrow I plan to do the same with er9x-2561.
User avatar
mhotar
Posts: 198
Joined: Wed May 16, 2012 9:57 pm
Country: -
Location: Jemnice, Vysocina

Re: ATmega2561 support in openTx

Post by mhotar »

mbanzi wrote:In my opinion it's ready to go!

Tomorrow I plan to do the same with er9x-2561.
I should agree. I spent all the weekend with my 2561/OpenTX on the field and had no issue. If the audio-mod works, it is all OK.

About the fuses. I tested both "low power" and "full swing" oscillators, both works OK. Because "full swing" is more robust to interference, I went with this, together with BOD at 4,3V. I will follow Mike, and switch JTAG off too.
bertrand35
9x Developer
Posts: 2764
Joined: Fri Dec 30, 2011 11:11 pm
Country: -

Re: ATmega2561 support in openTx

Post by bertrand35 »

So ... Time to add the 2561 target to companion?
User avatar
mbanzi
Posts: 223
Joined: Thu May 24, 2012 5:53 am
Country: -
Location: San Diego, CA

Re: ATmega2561 support in openTx

Post by mbanzi »

bertrand35 wrote:So ... Time to add the 2561 target to companion?
I think so! I didn't run into any issues with openTx (or er9x-2561 for that matter). You can send me & mhotar a version to test before you release it. If I can import some of my more complex models I'll do a little more testing also.
jeffreymstrong
Posts: 4
Joined: Mon Aug 06, 2012 2:21 pm
Country: -

Re: ATmega2561 support in openTx

Post by jeffreymstrong »

I'm researching the M2561 upgrade on the stock 9x.

I am unable to find the option in Companion9x to download/compile the firmware for openTX for M2561 / 9x Board.

TIA
User avatar
mbanzi
Posts: 223
Joined: Thu May 24, 2012 5:53 am
Country: -
Location: San Diego, CA

Re: ATmega2561 support in openTx

Post by mbanzi »

jeffreymstrong wrote:I am unable to find the option in Companion9x to download/compile the firmware for openTX for M2561 / 9x Board.
As far as I know the m2561 support for the 9x has not been added to companion yet, likely as most of the development effort has gone into supporting the Taranis. Mike has added support to eePe & er9x though, that's what I currently use.
User avatar
KAL
Posts: 552
Joined: Thu Oct 10, 2013 4:36 pm
Country: Germany
Location: somewhere near Rothenburg ob der Tauber

Re: ATmega2561 support in openTx

Post by KAL »

It's been a while ago, but ...
bertrand35 wrote:So ... Time to add the 2561 target to companion?
Any chances that this still may happen?

Cheers
Klaus
( TH9X / 9XTreme / FrSky DHT / Spektrum / Multi / RotEnc )
( 9XR PRO / erSKY9x  / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )

Post Reply

Return to “openTx”