eePe and ATMega128 - memory access problem

How to use eePe
Post Reply
User avatar
Gites
Posts: 5
Joined: Wed May 30, 2012 9:51 am
Country: -
Location: Stockholm, Sweden

eePe and ATMega128 - memory access problem

Post by Gites »

Hi,
I've changed MCU in my Turnigy 9X to bigger brother ATMega128. Both 64 and 128 are fully compatible so even software build for 64 works fine on 128 version - no problem here. I got my transmitter up and running (ATMega128 + ER9x-FRSKY-NOHT r.708). Everything works like a charm except I'm not able to upload or download (Read Memory from TX) settings using eePe. avrdude works ok - it creates binary file in the temp directory on eePe request. It is eePe which can not process it for some reason. I get error message:
"Error reading file: This might be a FW file (er9x.hex?). You might want to try flashing it to the TX. (Burn -> Write Flash Memory)"
I saw "m128" in the eePe configuration so I assume that it supports ATMega128 so I assume this is the bug.
Have any other 9X with ATMega128 owner spotted similar problem?
BR / Gites
Gites

Romolo
9x Developer
Posts: 1109
Joined: Sat Dec 31, 2011 12:11 am
Country: -
Location: Massa (MS), Tuscany, Italy

Re: eePe and ATMega128 - memory access problem

Post by Romolo »

Gites wrote:Hi,
I've changed MCU in my Turnigy 9X to bigger brother ATMega128. Both 64 and 128 are fully compatible so even software build for 64 works fine on 128 version - no problem here. I got my transmitter up and running (ATMega128 + ER9x-FRSKY-NOHT r.708). Everything works like a charm except I'm not able to upload or download (Read Memory from TX) settings using eePe. avrdude works ok - it creates binary file in the temp directory on eePe request. It is eePe which can not process it for some reason. I get error message:
"Error reading file: This might be a FW file (er9x.hex?). You might want to try flashing it to the TX. (Burn -> Write Flash Memory)"
I saw "m128" in the eePe configuration so I assume that it supports ATMega128 so I assume this is the bug.
Have any other 9X with ATMega128 owner spotted similar problem?
BR / Gites
May you post the binary file of the eeprom ?
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: eePe and ATMega128 - memory access problem

Post by MikeB »

I think eepe gets confused because the EEPROM in a '128 is twice the size of the'64. You could try reading it with the M64 selected, and the -F flag (I think) to ignore the signature error.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
Gites
Posts: 5
Joined: Wed May 30, 2012 9:51 am
Country: -
Location: Stockholm, Sweden

Re: eePe and ATMega128 - memory access problem

Post by Gites »

Mike... you are correct. Forcing avrdude to treat ATMega128 as 64 produces half size hex file than before, i.e. 4939 Bytes. eePe has no problem to fetch all data from it. So in that way it works - still bug but can be omitted by this workaround.
Romolo... I have attached two EEPROM hex files:
- er9x_settings_m128.hex - it can be found in temp directory after faulty "Read Memory from TX" command.
- er9x_settings_m64_-F.hex - this is the one got by setting m64 and -F . As I said, this approach works fine. IMHO it needs to be fixed properly anyway.
Attachments
er9x_settings_m64_-F.hex
EEPROM binary which is processed by eePe without any problems
(4.82 KiB) Downloaded 358 times
er9x_settings_m128.hex
EEPROM binary causing error in eePe
(9.64 KiB) Downloaded 435 times
Gites
User avatar
Gites
Posts: 5
Joined: Wed May 30, 2012 9:51 am
Country: -
Location: Stockholm, Sweden

Re: eePe and ATMega128 - memory access problem

Post by Gites »

Seems my posts disappeared... gosh :/
Gites

User avatar
Crucial
Posts: 581
Joined: Tue Dec 27, 2011 6:56 pm
Country: -
Location: SE WI, USA

Re: eePe and ATMega128 - memory access problem

Post by Crucial »

Nope, just hadn't been approved yet. New members need their first few post approved to weed out the spammers. You should be good to go.
Romolo
9x Developer
Posts: 1109
Joined: Sat Dec 31, 2011 12:11 am
Country: -
Location: Massa (MS), Tuscany, Italy

Re: eePe and ATMega128 - memory access problem

Post by Romolo »

Gites wrote:Mike... you are correct. Forcing avrdude to treat ATMega128 as 64 produces half size hex file than before, i.e. 4939 Bytes. eePe has no problem to fetch all data from it. So in that way it works - still bug but can be omitted by this workaround.
Romolo... I have attached two EEPROM hex files:
- er9x_settings_m128.hex - it can be found in temp directory after faulty "Read Memory from TX" command.
- er9x_settings_m64_-F.hex - this is the one got by setting m64 and -F . As I said, this approach works fine. IMHO it needs to be fixed properly anyway.
Ok indeed both contains valid data, it's just a problem of eepe.
I have fixed in companion and I think it can be very easy to fix in eepe too.
User avatar
Gites
Posts: 5
Joined: Wed May 30, 2012 9:51 am
Country: -
Location: Stockholm, Sweden

Re: eePe and ATMega128 - memory access problem

Post by Gites »

Hopefully "Write Memoty to TX" will work for ATMega128 too ;)
Gites
s_mack
Posts: 882
Joined: Thu Dec 29, 2011 6:11 am
Country: -

Re: eePe and ATMega128 - memory access problem

Post by s_mack »

As I've just run into this same issue... it hasn't yet been fixed I guess.
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: eePe and ATMega128 - memory access problem

Post by MikeB »

I'm working on it! I've recently swapped a M64 to a M128 (now I can see to solder it thanks!).
I'm still finding my way round eepe. I think I have most things sorted, but there remains a couple of things that need thinking about.

Suppose you have a eepe file saved from a M64. It needs converting to M128 format if you want to write it to a M128.

I have a version of er9x that runs on the M128, uses all 4K of EEPROM.

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

Post Reply

Return to “eePe”