Turnigy 9X, Bricked?? ((SOLVED))

er9x is the best known firmware. It has a superb range of features and is well supported by the community. Well worth trying out.
Post Reply
Cardiak
Posts: 5
Joined: Fri Mar 08, 2013 7:14 pm
Country: -

Turnigy 9X, Bricked?? ((SOLVED))

Post by Cardiak »

Greetings.
I am new to this and as such reckless. :)
A week ago my Turnigy 9x with flash and firmware eeepe er9x using arduino UNO, Friday firmware upgrade and everything went OK, I noticed that I could not read the EEPROM (which stores data models) but gave error researched and you just had to comment on a couple of lines and ready, he could read and write the configuration memory. then investigated and could translate the language of the firmware, a partner of the forum told me that in er9x should be compiled with the changes, while the availability of open9x and Spanish translation.

My surprise is when I try to update the firmware and AVRdude says it does not recognize the chip and it should be a ATMEGA64.

I use the command avrdude-F and skips comprovación chip, but when you just entered and checked the copy fails.
I use avrdude-F-V, and gives no error (obviously) but did not affect the station, after a lot of laps, which can be read realcionados with atmega fuse, I keep playing with the companion eeepe and now with the fuses and ......

Now the station is permanently LOADING screen and the name of my plane (model that believes in er9x).

Any suggestions??

PS: sorry for my English, I am using a translator
Last edited by Cardiak on Sun Mar 10, 2013 3:34 pm, edited 1 time in total.

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

Re: Turnigy 9X, Bricked??

Post by rperkins »

Does avrdude see your 9x now ? Were you able to fix that by resetting fuses to default ?

I have never heard of good results using (-₣) dont do it.

Once avrdude is seeing the 9x i would flash with an official version of er9x. Once you are back to beginning, the flash with spanish version.
Cardiak
Posts: 5
Joined: Fri Mar 08, 2013 7:14 pm
Country: -

Re: Turnigy 9X, Bricked??

Post by Cardiak »

Thanks for your answer.
Now I know it's not good to use the-F and-V, :).
I could not reset the fuse does not detect that either the chip says this 0000 fuses. Yesterday I read that I should buy a 1MHz oscillator and solder in the solder point, download it from: http://er9x.googlecode.com/svn/trunk/doc/Fuse% 20Brick.pdf.
You think that might be the solution?
User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Turnigy 9X, Bricked??

Post by rperkins »

Yes, you are on the right track . The oscillator is needed sometimes when the fuses have been changed. Some ideas before you buy an oscillator.

Sometimes just slowing down the programmers speed will allow you to program the fuses and get it talking. Add the '-B 100' Bitclock option to your 'extra arguments' in the avrdude configuration section of eepe. I've never actually used an arduino from within eepe, but I have used one with avrdude from the command line. I seem to remember using 'avrisp' and having to set the baudrate with the -b option also. Maybe it was '-b 19200'. I'd have to look it up but you probably already have a working eepe/avrdude/arduino configuration . When you get it working it be great to see what 'extra arguments' are used in eepe with an arduino as a programmer. I'm also assuming your running the ArduionoISP sketch.

If that does not work you probably dont have to buy an oscillator. You could use the arduino as an oscillator itself. I just glanced at ArduinoISP and it does not provide that function but I have seen it in Nick Gammons Atmega bootloader programmer http://www.gammon.com.au/forum/?id=11635 . His program is not what you need but it should be easy to get that functionality into ArduinoISP, unless that timer is already in use. If the -B option doesnt work and you wanna go down this route, we'll tackle it then.

Good luck
Cardiak
Posts: 5
Joined: Fri Mar 08, 2013 7:14 pm
Country: -

Re: Turnigy 9X, Bricked??

Post by Cardiak »

Perfect, perfect!
Thanks for the tips, effectively applying a pulse on pin 24, 1 mhz I could reset the fuse, I mean:

Today is Sunday and in Spain this all shops closed, I can buy an oscillator ... but I have the arduino, I got a skech using one chip clocks to generate a pulse of 1 Mhz, but I have another programmer, so I've attached the code that generates the pulse ArduinoISP code, attached the code:
http://arduino.cc/forum/index.php?topic=122065.0

# define myOutputPin 6

void setup ()
{
pinMode (myOutputPin, OUTPUT);
TCCR1A = 0;
TCCR1B = 0;
TCNT1 = 0;
OCR1A = 7; / / toggle after counting to 8
TCCR1A | = (1 << COM1A0) / / Toggle on Compare Match OC1A.
TCCR1B | = (1 << WGM12) / / CTC mode
TCCR1B | = (1 << CS10); / / clock on, no pre-scaler
}
void loop () {}

I've added this to the ISP code to program the ATMEGA64 as she applied a 1MHz pulse on pin 24, and I reset the fuses AVRdude like so:

avrdude.exe-c arduino-p m64-b 19200-P com4-u-U lfuse: w: 0x1E: m-U hfuse: w: 0x96: m-U eFUSE: w: 0x02: m-F

avrdude.exe: safemode: lfuse changed! Was 1e, and is now 0
Would you like this fuse to be changed back? [y / n] n
avrdude.exe: safemode: Fuses OK

avrdude.exe done. Thank you.

set the arduino pin to generate the pulse is pin 6, with a simple soldier in the resistance wire marking the PDF of sufficient previous comment.

Another improvement I found on the net, is that the program does not work properly ArduinoISP example with optional companion / eeepe that records and reads the settings, the solution is to make two lines of code:

uint8_t write_eeprom (int length) {
/ / Here is a word address, get the byte address
int start = here; / / * 2; ---------- Add two bars at * 2

eeprom_read_page char (int length) {
/ / Here again we have a word address
int start = here; / / * 2; ---------- Add two bars at * 2


Perfect, now we have a flash code optimized for emiters with an output at 1MHz to set starting fuses.

Thank you very much again.

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

Re: Turnigy 9X, Bricked?? ((SOLVED))

Post by rperkins »

Glad you got it going.

I looked at the code change you refer to. That is a change in ArduinoISp , not eepe.
the original code multiplied a variable by 2. the change copies the variable as is . I didnt chase further but it is probably a word -vs- byte issue in ArduinoIsp that comes up when reading the eeprom of a m64.

I'd like to develop an alternative usbasp firmware that provides a clock when needed. That way the poor soul who scrambled his fuses has a source to reset them. Had been thinking of pushing it out one of the LED outputs. The power led would appear to be on, slightly dim, but actually be pulsing as a clock. Never got any further than thinking about it :)

Post Reply

Return to “er9x”