Flashed with ArduinoISP 0023, won't power on

Post Reply
sirachacopter
Posts: 12
Joined: Tue Jun 02, 2015 11:12 am
Country: -

Flashed with ArduinoISP 0023, won't power on

Post by sirachacopter »

I just finished flashing a Turnigy 9X with er9x r818 using an Aruino Uno R3 and ArduinoISP from IDE 0023 (yeah, I know it's old), with a capacitor to disable the Arduino's auto reboot. It provides 5V and no battery was used to power the TX.

I used eePe and the flash went without a hitch. The only items I modified in the AVRDUDE Configuration screen were Programmer: Arduino, Port: com4, and Extra Arguments: -b19200. Prior to the flash I read the EEPROM memory and TX flash without issues as well.

Now I don't get anything on screen when power is applied. I don't know where to start troubleshooting. I verified that the TX powered on before running eePe. Should I try and reflash my Turnigy 9X firmware?

I've read on pages such as http://blog.oscarliang.net/turnigy-9x-advance-mod/ that some ArduinoISP sketch changes are needed, but my version did not have the variables listed on that page. No chance of plugging in the battery connector backwards -- I have the original one in place still and it is keyed/idiotproof.

Help please!

Image
Image

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

Re: Flashed with ArduinoISP 0023, won't power on

Post by jhsa »

Did you use eepe to download the firmware?
Can you read the eeprom?
Please go to the burn menu and read the fuses. Post the result here.

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
sirachacopter
Posts: 12
Joined: Tue Jun 02, 2015 11:12 am
Country: -

Re: Flashed with ArduinoISP 0023, won't power on

Post by sirachacopter »

Yes, I used the hex file that was provided when I started eePe for the first time.

Yes I can read the EEPROM.

Here is the fuse printout:

Code: Select all

=================================================================================
Started AVRDUDE
C:/Program Files (x86)/eePe/avrdude.exe -c arduino -p m64 -b19200 -P com4 -U lfuse:r:-:i -U hfuse:r:-:i -U efuse:r:-:i
=================================================================================

avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.04s

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

Reading | ################################################## | 100% 0.04s

avrdude.exe: writing output file "<stdout>"
avrdude.exe: reading hfuse memory:

Reading | ################################################## | 100% 0.04s

avrdude.exe: writing output file "<stdout>"
avrdude.exe: reading efuse memory:

Reading | ################################################## | 100% 0.04s

avrdude.exe: writing output file "<stdout>"

avrdude.exe done.  Thank you.


=================================================================================
AVRDUDE done - SUCCESSFUL
=================================================================================
=================================================================================
FUSES: Low=0e High=89 Ext=ff
=================================================================================
Thanks for reading!
sirachacopter
Posts: 12
Joined: Tue Jun 02, 2015 11:12 am
Country: -

Re: Flashed with ArduinoISP 0023, won't power on

Post by sirachacopter »

Should the resulting file from a "Read TX firmware" md5sum/sha1 checksum match that of the er9x.hex file that I programmed earlier?
User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Flashed with ArduinoISP 0023, won't power on

Post by rperkins »

Probably not. The firmware is in 16 bit format and avrdude stores in 32 bit format. IIR.
Open the files as txt and look at the first 2 digits of each line . 10 (16)or 20(32).
I did convert one to the other at one time, would have to look that up again.
It is posible to manually compare a few lines, once you become familiar with the format.
http://en.m.wikipedia.org/wiki/Intel_HEX

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

Re: Flashed with ArduinoISP 0023, won't power on

Post by rperkins »

You can however use the verify option of avrdude to compare the contents of a file with the contents of the MCU.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Flashed with ArduinoISP 0023, won't power on

Post by MikeB »

You may just have a problem with the display contrast setting.
Use eepe and read the EEPROM (click on the toolbar button "Read Memory from Tx").
Go into the General Settings, and check the value for the Contrast is 25. If it isn't, set it to 25 and write the EEPROM back to the Tx.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Flashed with ArduinoISP 0023, won't power on

Post by jhsa »

I remember now I did have that problem with one of my radios.. the contrast was set to zero for some reason..

Mike, would that happen when the radio formats the eeprom? maybe some little bug 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
sirachacopter
Posts: 12
Joined: Tue Jun 02, 2015 11:12 am
Country: -

Re: Flashed with ArduinoISP 0023, won't power on

Post by sirachacopter »

Hmm I tried "Read Memory from TX" and while the avrdude output looks good, I got a pop up error message afterwards:

Code: Select all

=================================================================================
Started AVRDUDE
C:/Program Files (x86)/eePe/avrdude.exe -c avrisp -p m64 -b19200 -P com4 -U eeprom:r:C:/Users/<REMOVED>/AppData/Local/Temp/temp.hex:i
=================================================================================

avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.12s

avrdude.exe: Device signature = 0x1e9602
avrdude.exe: reading eeprom memory:

Reading | ################################################## | 100% 21.17s

avrdude.exe: writing output file "C:/Users/<REMOVED>/AppData/Local/Temp/temp.hex"

avrdude.exe done.  Thank you.


=================================================================================
AVRDUDE done - SUCCESSFUL
=================================================================================
Image

But, "Read EEPROM Memory to File" completes without issue. Can I determine the contrast setting from that file? How are they different? Is one just loaded into eePe memory for use on the fly, and one saved to a file for backup?

Edit: Would still like to know why the first option failed, but I figured out that you can load the eeprom file ... but then eePe crashed:

Code: Select all

Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:	eepe.exe
  Application Version:	0.0.0.0
  Application Timestamp:	5525adb1
  Fault Module Name:	eepe.exe
  Fault Module Version:	0.0.0.0
  Fault Module Timestamp:	5525adb1
  Exception Code:	c0000005
  Exception Offset:	0000a1f1
  OS Version:	6.1.7601.2.1.0.256.1
  Locale ID:	1033
  Additional Information 1:	0a9e
  Additional Information 2:	0a9e372d3b4ad19135b953a78882e789
  Additional Information 3:	0a9e
  Additional Information 4:	0a9e372d3b4ad19135b953a78882e789

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt
I'm using the latest eePe on Windows 7 64-bit. About dialog shows Revision 413 April 8 2015
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Flashed with ArduinoISP 0023, won't power on

Post by jhsa »

Maybe your radio still didn't format the eeprom.
Try pressing a key a little after you power it up. Then wait about 20 seconds again. Then try reading the eeprom again.
Don't use the read memory to file option for now. Use the other option to load it directly into eepe..
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
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Flashed with ArduinoISP 0023, won't power on

Post by MikeB »

Please check in "Preferences" you have the M64 selected as the processor in both places where you can select either "Processor" or "MCU".

Please also do the following:
Read the Tx flash memory to a file.
Read the Tx EEPROM to a file.
Put both of these, together with the original er9x.hex file you flashed into a .zip file and post it on this thread.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
sirachacopter
Posts: 12
Joined: Tue Jun 02, 2015 11:12 am
Country: -

Re: Flashed with ArduinoISP 0023, won't power on

Post by sirachacopter »

@jsha: Have to read to file, as the other option doesn't work

@MikeB

Verified that Processor/MCU is set to M64 in both places.

Zip with all 3 files: http://www.filedropper.com/er9xturnigy9x

Is the linux client more stable? I may try it this weekend, at least to see if I can read an eeprom without the app crashing.

Thanks for the help!
sirachacopter
Posts: 12
Joined: Tue Jun 02, 2015 11:12 am
Country: -

Re: Flashed with ArduinoISP 0023, won't power on

Post by sirachacopter »

Holy c**p! My last eeprom dump was different than the initial one I made. Not sure why ...

Anyway, I got the er9x splash screen. It complained about throttle being non-zero even though it was at the minimum position.

I didn't see the eeprom format warning. Hope that is okay ...

Still can't view the eeprom in the app without the pop up error message from a few posts up appearing.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Flashed with ArduinoISP 0023, won't power on

Post by MikeB »

If it is now working, you need to set the stick mode, and calibrate the sticks, then the throttle warning will go away.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Flashed with ArduinoISP 0023, won't power on

Post by jhsa »

I remember about a year or so ago, someone having trouble with the arduino as programmer and the eeprom. If I'm not mistaken, in the end he managed to solve the problem. A search on this forum could help..

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
sirachacopter
Posts: 12
Joined: Tue Jun 02, 2015 11:12 am
Country: -

Re: Flashed with ArduinoISP 0023, won't power on

Post by sirachacopter »

Got it. Thanks Mike.

João: Thanks. I ended up changing Arduino v1.0.0 from 0023 and making the serial buffer changes mentioned in the link from my first post, and also used the sketch mentioned in the link. That effectively changed my programmer from "arduino" to "avrisp." Strange that subsequent firmware dumps are the same as my initial ones but the EEPROMs are
different than before. Maybe I was able to blindly reset the EEPROM like was mentioned by a post above.



So my remaining agenda is to:


1) Reset my EEPROM just in case I didn't before
2) Reset the stick default positions using Stick Mode
3) Try to get an eePe setup that allows me to read dumped EEPROM files

Even though I got my radio display to work, could I still trouble someone to verify that the EEPROM file in the above ZIP can be opened with eePe (without an error pop up like above)?

If you could note the Mac/Windows/Linux OS and eePe software revision I would appreciate it greatly.

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

Re: Flashed with ArduinoISP 0023, won't power on

Post by jhsa »

can't read the eeprom file in windows.

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
sirachacopter
Posts: 12
Joined: Tue Jun 02, 2015 11:12 am
Country: -

Re: Flashed with ArduinoISP 0023, won't power on

Post by sirachacopter »

Same pop up as me?
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Flashed with ArduinoISP 0023, won't power on

Post by MikeB »

Just got back home and had a chance to look at the EEPROM file. While it is 2K bytes long, as it should be, the content is incorrect. It looks as though it is missing every other byte, so the 2K is compressed into 1K, then this 1K image is repeated.

It seems that this programmer is not reading the bytes of the EEPROM correctly.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
sirachacopter
Posts: 12
Joined: Tue Jun 02, 2015 11:12 am
Country: -

Re: Flashed with ArduinoISP 0023, won't power on

Post by sirachacopter »

Could this have anything to do with the fact that I never saw a prompt to reset the EEPROM? Is this weird at all, as I was able to write to Flash (which performs a read/verify afterwards)? Is there anyway to verify that the flash dump I made is valid?

What version of eePe are you using?

Thanks for all the replies everyone
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Flashed with ArduinoISP 0023, won't power on

Post by MikeB »

I just had a quick look and they do seem to match. However, the operation for the programmer to read the EEPROM uses different commands so there is scope for the programmer to get it wrong. I vaguely recall a similar problem with a programmer, but I can't remember which or when.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
sirachacopter
Posts: 12
Joined: Tue Jun 02, 2015 11:12 am
Country: -

Re: Flashed with ArduinoISP 0023, won't power on

Post by sirachacopter »

I am currently reading: http://scuola.arduino.cc/courses/lessons/view/B7PlK61

It notes that the arduinoISP generic avrdude command string supported is:
-U memtype:op:filename[:format]

so for EEPROM reads that is:
-U eeprom:r:/tmp/eeprom.hex:i

This is the same command I see in eePe's output:
avrdude.exe -c avrisp -p m64 -b19200 -P com4 -U eeprom:r:C:/Users/<REMOVED>/AppData/Local/Temp/temp.hex:i

So it *should* work. I may have to try a more simple EEPROM write/read test

I will search the forums for any related arduino issues.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Flashed with ArduinoISP 0023, won't power on

Post by jhsa »

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

Re: Flashed with ArduinoISP 0023, won't power on

Post by MikeB »

I didn't explain it very well. You are referring to the command AvrDude sends to the programmer, I'm referring to what the programmer sends to the chip itself. The programmer has send a "EEPROM read command", with the EEPROM address it wants to read to the chip, and receive the data back from the chip. It has to do this for all the bytes in the EEPROM. It seems it may be doing this incorrectly.
I definitely remember there was a problem with programming an ATMEGA128 with some USBASP programmers where they didn't access the second 64K, so this was an addressing problem.

What code do you have running in your Arduino now?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
sirachacopter
Posts: 12
Joined: Tue Jun 02, 2015 11:12 am
Country: -

Re: Flashed with ArduinoISP 0023, won't power on

Post by sirachacopter »

I first made a modification to the Arduino support files: "change the serial buffer of the Arduino because the Arduino can’t keep up with the data (er9x firmware) being sent to it over serial on default settings. To do this, find the arduino install directory, and go to: arduino-x.x/hardware/arduino/cores/arduino and opened HardwareSerial.cpp in a text editor. search for #define SERIAL_BUFFER_SIZE and change its value from 64 to 128."

Next, I loaded this modified version of the arduinoISP sketch: "The current Arduino ISP sketch can’t handle the large amount of EEPROM that the ER9x firmware uses (the stock firmware does too), so try to upload this sketch instead: http://arduin0.blogspot.co.uk/2013/12/a ... gy-9x.html"

So you think that the flash reads may be working, but the EEPROM reads may not? Worst case, I will be receiving an USBasp from eBay next week that I intend to mount inside the Turnigy 9x.

Thanks for your continuing support
User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Flashed with ArduinoISP 0023, won't power on

Post by rperkins »

I looked at your zip but didnt see the arduino sketch you are running.

I seem to recall having to make the change mentioned here when I used an arduino as an isp, although it has been over a year since I used the arduino as an isp. Note there are 2 places the code needs to be changed. I think this change goes along with Mikes comment "It looks as though it is missing every other byte".

viewtopic.php?f=109&t=1057&start=30#p15325
sirachacopter
Posts: 12
Joined: Tue Jun 02, 2015 11:12 am
Country: -

Re: Flashed with ArduinoISP 0023, won't power on

Post by sirachacopter »

Thanks for the links jhsa and rperkins. I will try what is suggested in that link and see if I can load an EEPROM finally. I won't be able to try for a few days. Will report back.

Any issues with the latest eePe for windows?

Thanks everyone!

Post Reply

Return to “PROGRAMMERS”