Think I may have killed my first 9x

Cant get your radio to work? General Hardware issues?
Post Reply
User avatar
mbanzi
Posts: 223
Joined: Thu May 24, 2012 5:53 am
Country: -
Location: San Diego, CA

Think I may have killed my first 9x

Post by mbanzi »

I have been testing a brand new Turnigy 9x with an ATmega2561 mod for Bertrand. At this point the only mod is the m2561 replacing the m64. The transmitter has been working fine for several weeks. I was about to start adding mods today to continue the testing, when I noticed my transmitter would sometimes reboot when using the rudder & aileron trims. In my past experience replacing the m64 this is usually caused by bad solder joints on the MCU. I proceeded to resolder all the connections using a little bit of solder paste & my hot air rework station. I made sure there were no solder bridges between pins, but when I fired up the transmitter - NOTHING. No display or beeps.

I checked the VREGs but did not get any output from them, but they appeared fine. I then re-checked the MCU and found a short between VCC & GND :oops: Don't know how I missed this, as I tested for continuity between neighboring pins. I removed the MCU and checked it, but the short was gone, so it must have been some stray solder shorting pins.

Long story short: I replaced the chip with another m2561, checked, tested and rechecked for shorts. Set the fuses and flashed the firmware, unfortunately still nothing. I had a spare LCD, so I even tried that, just in case. VREG outputs look ok at 3.3v & 5v, and MCU gets 5v supply.

At this point I have no idea what else to check for. The transmitter was powered on with a short between VCC & GND at the MCU, but there was no magic smoke :? Any suggestions what I could look for? Unfortunately I don't have an oscilloscope any more, so I'm limited to a multimeter.

User avatar
MikeB
9x Developer
Posts: 18000
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Think I may have killed my first 9x

Post by MikeB »

The fact that you started getting reboots when using trim switches does suggest something else might have gone wrong.
If you can flash the fuses and firmware, the basic processor and it's crystal appear to be working.
Have you read the fuses and flash back to confirm the processor has programmed correctly?

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: Think I may have killed my first 9x

Post by jhsa »

do you actually have 5v at the processor pins? When you flash the tx is it powered by the programmer or the radio's battery?
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: Think I may have killed my first 9x

Post by mbanzi »

MikeB wrote:Have you read the fuses and flash back to confirm the processor has programmed correctly?
Yes, I usually read the fuses back immediately after setting them to confirm. The flash verified ok:

avrdude.exe: 56718 bytes of flash verified

avrdude.exe: safemode: lfuse reads as E
avrdude.exe: safemode: hfuse reads as 89
avrdude.exe: safemode: efuse reads as FF

When I read the flash back to a file, it is much larger than the original hex - why is that?
jhsa wrote:do you actually have 5v at the processor pins? When you flash the tx is it powered by the programmer or the radio's battery?
Yes I have 5V at pins 21, 52 & 64. At the moment the board is powered only by the programmer during flashing, as I had it out of the transmitter completely initially.

Any suggestions which components could have gotten damaged, if the VCC-GND pins were shorted at the processor?
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Think I may have killed my first 9x

Post by jhsa »

I guess you wouldn't be able to flash it if they were.. there's a little inductor separating 2 grounds if I'm not mistaken.. maybe you could check that.. don't have the schematic here with me at the moment. but don't know if that would cause the problem..

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

Re: Think I may have killed my first 9x

Post by MikeB »

In passing, I'd suggest the Hfuse should be C9, this disables the JTAG that otherwise upsets some of the A2D signals.

Have a check of the RESET signal (pin 20). It should be at +5V. It is pulled low for programming, but if it stays low, then the processor won't execute the code, and it could have caused reboots if it went low previously.

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: Think I may have killed my first 9x

Post by mbanzi »

MikeB wrote:Have a check of the RESET signal (pin 20). It should be at +5V.
Thanks Mike, I checked pin 20 it is high when the transmitter's powered on.
User avatar
MikeB
9x Developer
Posts: 18000
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Think I may have killed my first 9x

Post by MikeB »

OK, going through the obvious:
56718 bytes is quite small, is this a specific version of openTx for the 2561 with most options not included? I assume it is the same file you had previously loaded and it was working before the reboots and chip replacement.
The 'standard' version for the 64 will run on the 128, but not the 2561.

When you read the flash, it will read all 256K, not just the 56718 bytes you have programmed.

Pins 11 to 16 are the six push button inputs. On reset the pins are inputs with no internal pullups. The loaded program should enable the pullups. So, a useful test is, are these 6 pins pulled up to 5V, and get pulled down when you press the buttons? (11-MENU, 12-EXIT, then DOWN, UP, RIGHT, LEFT).

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: Think I may have killed my first 9x

Post by mbanzi »

MikeB wrote:56718 bytes is quite small, is this a specific version of openTx for the 2561 with most options not included? I assume it is the same file you had previously loaded and it was working before the reboots and chip replacement.
Yes, Bertrand sent me a very basic m2561 version to test. It worked 100% during the first phase of testing. Well except for the horizontal trim switches causing reboots, which I also had on one of my m128 replacements.
MikeB wrote:When you read the flash, it will read all 256K, not just the 56718 bytes you have programmed.
Ok! That explains the 451,924 byte .hex file on my Windows box.
MikeB wrote:Pins 11 to 16 are the six push button inputs. On reset the pins are inputs with no internal pullups. The loaded program should enable the pullups. So, a useful test is, are these 6 pins pulled up to 5V, and get pulled down when you press the buttons? (11-MENU, 12-EXIT, then DOWN, UP, RIGHT, LEFT)
All 6 pins are high & then go low when the corresponding button is pushed.

Good stuff this! I will put all the debugging steps in Wiki at some point.
User avatar
MikeB
9x Developer
Posts: 18000
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Think I may have killed my first 9x

Post by MikeB »

I don't think the code you have running is available for me to look at. I think the processor is beginning to run, but is possibly getting a reboot (probably watchdog) before it has time to do anything useful.
Have you got a backup of the EEPROM from when it was working you could load back in?
Otherwise, I think you might need some new code from Bertrand to sort out what is happening. Code that perhaps initialises the LCD almost immediately, then writes something to it before doing anything else.

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: Think I may have killed my first 9x

Post by mbanzi »

Thanks for the help Mike. I wish I could rule out anything on the actual main board though, since I powered it up while it was shorted. I'll ask Bertrand if he's not still very busy with the Taranis. In the meantime I'm looking at the schematics to see if anything pops out at me.
User avatar
MikeB
9x Developer
Posts: 18000
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Think I may have killed my first 9x

Post by MikeB »

If you still have 5 volts from the 5V regulator, you are probably OK. The regulator should have gone into current limit mode, then, on getting too hot, gone into shutdown and protected itself.

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

Post Reply

Return to “Hardware”