Page 42 of 44

Re: Introducing: TelemetrEZ

Posted: Sat Sep 27, 2014 5:01 pm
by LTMNO
Well, sad to say that it was working when i was programming via the t1634programmer.exe
but now, all i get is 'Connect the Target' prompt.
I do have OpenTX up and running, but it won't let me upload new eeprom updates via companion (latest)
Really strange behavior.

Before, i was able to download the Eeprom without the radio turned on. Now the radio has to be turned on in order to download the eeprom for opentx/companion.

its almost as if it doesn't detect the Tez Board anymore.

Thoughts?

Re: Introducing: TelemetrEZ

Posted: Sat Sep 27, 2014 5:13 pm
by LTMNO
what are the fuses for the TeZ? Can I read them if i have the USB connected directly to the SP Board and just get the Tez with radio not powered on?
What should i read if i run this command?
avrdude -p t1634 -c USBASP -P USB -v -F

Result not powered on:
avrdude: auto set sck period (because given equals null)
avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATtiny1634 is 1E 94 12

avrdude done. Thank you.

Result when powered on:
avrdude: auto set sck period (because given equals null)
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9702
avrdude: Expected signature for ATtiny1634 is 1E 94 12
avrdude: safemode: lfuse reads as E
avrdude: safemode: hfuse reads as 89
avrdude: safemode: efuse reads as 7
avrdude: current erase-rewrite cycle count is -1845425503 (if being tracked)

avrdude: safemode: lfuse reads as E
avrdude: safemode: hfuse reads as 89
avrdude: safemode: efuse reads as 7
avrdude: safemode: Fuses OK

avrdude done. Thank you.

I think the latter is reading the M128 via the SP board.

Re: Introducing: TelemetrEZ

Posted: Sat Sep 27, 2014 5:40 pm
by LTMNO
Along with that, everytime I try to write the EEPROM to Radio i get this error.
=================================================================================
Started AVRDUDE
C:/Program Files (x86)/OpenTX/avrdude.exe -c usbasp -p m128 -F -P usb -U eeprom:w:C:/Users/agosj/AppData/Local/Temp/396-temp.bin:r
=================================================================================

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

Reading | ################################################## | 100% 0.00s

avrdude.exe: Device signature = 0x000102
avrdude.exe: Expected signature for ATMEGA128 is 1E 97 02
avrdude.exe: current erase-rewrite cycle count is -50462977 (if being tracked)
avrdude.exe: reading input file "C:/Users/agosj/AppData/Local/Temp/396-temp.bin"
avrdude.exe: writing eeprom (4096 bytes):

Writing | ################################################## | 100% 47.23s

avrdude.exe: 4096 bytes of eeprom written
avrdude.exe: verifying eeprom memory against C:/Users/agosj/AppData/Local/Temp/396-temp.bin:
avrdude.exe: load data eeprom data from input file C:/Users/agosj/AppData/Local/Temp/396-temp.bin:
avrdude.exe: input file C:/Users/agosj/AppData/Local/Temp/396-temp.bin contains 4096 bytes
avrdude.exe: reading on-chip eeprom data:

Reading | ################################################## | 100% 1.09s

avrdude.exe: verifying ...
avrdude.exe: verification error, first mismatch at byte 0x0000
0x05 != 0x00
avrdude.exe: verification error; content mismatch

avrdude.exe done. Thank you.


=================================================================================
AVRDUDE done - exit code 1
=================================================================================

Re: Introducing: TelemetrEZ

Posted: Sat Sep 27, 2014 5:55 pm
by Kilrah
LTMNO wrote:What should i read if i run this command?
avrdude -p t1634 -c USBASP -P USB -v -F
You should never, ever use the -F option unless you want to brick the processor you're trying to read/program. If you get any error like an invalid signature you must stop and troubleshoot.

The combination of this plus the powered/not powered operation might have messed up the fuses.

I'm a bit rusty on the AVR programming problems, so I'll leave the others who are good at that continue...
The first thing to do would be to try either reading or writing with the correctly powered processor, and with programmer clock slowed down with -B 100 in the avrdude command line.

Re: Introducing: TelemetrEZ

Posted: Sat Sep 27, 2014 6:07 pm
by s_mack
LTMNO wrote:Well, sad to say that it was working when i was programming via the t1634programmer.exe
but now, all i get is 'Connect the Target' prompt.
I do have OpenTX up and running, but it won't let me upload new eeprom updates via companion (latest)
Really strange behavior.

Before, i was able to download the Eeprom without the radio turned on. Now the radio has to be turned on in order to download the eeprom for opentx/companion.

its almost as if it doesn't detect the Tez Board anymore.

Thoughts?
I'm confused. Or you are. What do you mean "it was working when i was programming via the t1634programmer.exe"? By "was" do you mean it is no longer working when programming via the t1634programmer? Or you mean you're attempting to update the TelemetrEZ with a different program? Or are/were you attempting to program your 9x with t1634programmer???

Download what eeprom? Your 9x's? Or TelemetrEZ's. Are you discussing two (or more) different issues here?


If you have a SmartieParts (rev 2.2 or newer) programmer, then you MUST ALWAYS have the radio powered ON (by battery) to do ANY programming operations with the 9x and you MUST ALWAYS have the radio powered OFF to do any programming operations with the telemetrEZ. The 9x's power state is precisely how the SmartieParts board knows what the "target" is (9x or TelemetrEZ).

Re: Introducing: TelemetrEZ

Posted: Sat Sep 27, 2014 6:07 pm
by jhsa
Yeah, it's written hundreds of times in this forum. NEVER, EVER, EVER, EVER USE THE -F OPTION ;) :)

Re: Introducing: TelemetrEZ

Posted: Sat Sep 27, 2014 6:22 pm
by LTMNO
alright, where to begin.

@s_mack - I have 2.4 and always use your program to update the Tez. The latest i had on there working with r89 from Mike with a fix for Xjt with er9x.
I was trying to use the same when i was updating my radio (t9x m128) with Opentx as i was bored and figure if i could give it a go as i have sold my taranis.
that being said, it would update fine with r90 and r98, etc but i couldn't get the AIL THR to go away like before. The fix was R86. then Kilrah commented on the post and I tried R89 again and that is when i couldnt program the TeZ anymore. I would get the connect device prompt. It doesn't program anymore with the radio turned off like it should.

@Kilrah, I have been using the -F option because for some reason my chip might be the 1281 or 128A, i can't remember but that got the HEX on there and able to run ER9x and OpenTX. I was great except for the AIL/THR switch problem.

@jhsa, my old friend. ;-) I know.. but its what i had to do.

That being said, I am read the Fuses, i can set the fuses. i can program the m128 and upload eeproms.
when i boot, i here the Tx Beep but then see no screen.

OpenTx or ER9x are not working.

I think the first thing is to get the right fuses onboard.

are these the right ones?

avrdude -p m128 -b 100 -P usb -c usbasp -B100 -u -U lfuse:w:0x0e:m -U hfuse:w:0x81:m -U efuse:w:0xff:m

or

avrdude -p m128 -b 100 -P usb -c usbasp -B100 -u -U lfuse:w:0x0E:m -U hfuse:w:0x89:m -U efuse:w:0xFF:m

is what i have been able to dig up on the forums.
Then if i get the fuses right and the firmware on, then i can debug the Tez problem. When the USB is plugged in and I run the Tez Update program. the board has a red light and a flashing green light.. no activity. just an fyi to Steven

Re: Introducing: TelemetrEZ

Posted: Sat Sep 27, 2014 6:34 pm
by Kilrah
LTMNO wrote: @Kilrah, I have been using the -F option because for some reason my chip might be the 1281 or 128A, i can't remember but that got the HEX on there and able to run ER9x and OpenTX. I was great except for the AIL/THR switch problem.

@jhsa, my old friend. ;-) I know.. but its what i had to do.
You MUST NOT use -F in ANY circumstance, I don't think it can be any clearer.
If it's the wrong processor then you must put the correct processor type in avrdude, nothing else. Otherwise you're pushing data that is not in the correct format or locations for the processor, with the kind of result you got. If it's the right processor but is not correctly detected, then there's a communication problem, and any data you'll be forcing in with -F will arrive corrupted anyway possibly destroying stuff in the process by writing in wrong locations, it won't get anything to work better.

Re: Introducing: TelemetrEZ

Posted: Sat Sep 27, 2014 6:43 pm
by s_mack
I think you need to get down to basics. I recommend you remove the TelemetrEZ entirely from the equation (ie. remove it from your radio and put the connections back to stock. Then, with the radio powered on, confirm that you can program your 9x (without using any -F) and that your switches work.

Did you physically remove your Atmega64A chip and replace it with an Atmega128A? You say "for some reason my chip might be the [...]" but the only "some reason" is if you physically removed and replaced it. 100% of them come from the factory with the 64.

Re: Introducing: TelemetrEZ

Posted: Sat Sep 27, 2014 7:03 pm
by jhsa
avrdude -p m128 -b 100 -P usb -c usbasp -B100 -u -U lfuse:w:0x0e:m -U hfuse:w:0x81:m -U efuse:w:0xff:m
These ones protect the eeprom so it doesn't get erased every time you flash the radio..
I would go for this one.
But instead of using avrdude directly maybe better to use eepe or companion to read and program the fuses.. I think it is safer. Install eepe, go to the burn menu, configure your programmer, CPU and com port. then in the burn menu there is a option to read fuses. click on it.. Now, what fuses do you have programmed?

João

Re: Introducing: TelemetrEZ

Posted: Sat Sep 27, 2014 10:24 pm
by LTMNO
alright, i will not use the -F again. ;-)
that being said.
i did use :
avrdude -p m128 -b 100 -P usb -c usbasp -B100 -u -U lfuse:w:0x0E:m -U hfuse:w:0x89:m -U efuse:w:0xFF:m

*notice no "-F"

That seemed to do the trick, I was able to load OpenTX again
and not i am back to my original problem.
AIL and THR are on, and I can't program the TeZ with the program supplied by s_mack.

Red Light on, Green light flashing all i get is 'Connect the Target' prompt.

Re: Introducing: TelemetrEZ

Posted: Sat Sep 27, 2014 10:48 pm
by LTMNO
s_mack wrote:I think you need to get down to basics. I recommend you remove the TelemetrEZ entirely from the equation (ie. remove it from your radio and put the connections back to stock. Then, with the radio powered on, confirm that you can program your 9x (without using any -F) and that your switches work.

Did you physically remove your Atmega64A chip and replace it with an Atmega128A? You say "for some reason my chip might be the [...]" but the only "some reason" is if you physically removed and replaced it. 100% of them come from the factory with the 64.
I have m128 chip... I have mod'd the radio. Rot Enc/Haptic/Power Reg/Speaker/Voice9X and many more.
my setup all worked..with R89 before I tried to upgrade to OpenTx.

Re: Introducing: TelemetrEZ

Posted: Sat Sep 27, 2014 10:49 pm
by LTMNO
is there a way to corrupt the Tez and if so, can it be restored?

I have confirmed that i have do the right m128.
I have written a DOS app to program and check and all is working with erasing, fuseing, writing the hex and eeprom.

see attached.

I think now that my TeZ is in dismay...

Re: Introducing: TelemetrEZ

Posted: Sun Sep 28, 2014 12:59 am
by s_mack
I'm sure if you try hard enough :)

I've never seen one "corrupted" so I've never had to resolve that.

Can you show us how exactly you have the connections? I mean... you said something about a red light on and green light flashing... what lights are these? There's no green light on the SP board.

Re: Introducing: TelemetrEZ

Posted: Sun Sep 28, 2014 1:12 am
by LTMNO
Is this Steven M? ;-)
I read in another post of yours talking about LED's and like patterns.
But that being said.
There are 2 LEDs on the 2.4 SP board (D5)Red and (D4)Green.
When you plug in the USB cable the Red LED comes on.
When you run your Application to program TEZ, the Green LED comes on and Blinks.
LEDs On with USB plugged in Radio Off
LEDs On with USB plugged in Radio Off

Re: Introducing: TelemetrEZ

Posted: Sun Sep 28, 2014 1:34 am
by bob195558
Hi LTMNO,

What and/or is the Yellow wire that is soldered to the VBL on the 9x Solderless Programmer Board Rev 2.4, for ? :?:

Bob B. :)

Re: Introducing: TelemetrEZ

Posted: Sun Sep 28, 2014 1:39 am
by LTMNO
Hi Bob B.
MegaSound9X

There is also a Rotary Encoder attached to the TeZ

Again, important to note, this all worked...
When fusing the m128 with power on and accidentally did it with power off... is what i suspected bricked my TeZ.

The TeZ does not program anywhere with the t1634programmer.exe app.

This all worked, case has been closed, nothing has changed..
Case open now to see what is going on.
With TeZ removed... AIL/THR switches work.

We need to debug how to check if TeZ is working?

Cheers.

Re: Introducing: TelemetrEZ

Posted: Sun Sep 28, 2014 2:47 am
by s_mack
Lol... you'd think I'd know my own product. Guess I forgot I put a 2nd LED on there. Sigh, its been awhile since I was working on the design ;)

Re: Introducing: TelemetrEZ

Posted: Sun Sep 28, 2014 2:54 am
by s_mack
LTMNO wrote:With TeZ removed... AIL/THR switches work.

We need to debug how to check if TeZ is working?
You'll get those switch errors if:

1) Your 9x doesn't have supporting firmware
2) Your TelemetrEZ's firmware is incorrect
3) Something's hooked up incorrectly
4) Something's wrong with the unit

How to figure out what's what? There's no simple method other than deductive elimination.

1) Make sure you have appropriate firmware on your 9x. That means the Frsky variant of ER9X or telemetrez option selected in OpenTX. If you've only tried one, then try the other and/or roll back to an older version to make sure something didn't get broken in a firmware update.
2) A common mistake is to write the HTML file to tEZ rather than the hex file itself.
3) Pictures help
4) How to know? The only practical way I can think of is to get a new TelemetrEZ and try it. If the problem is magically resolved, then something's wrong with the original. If not, then its something else.

Re: Introducing: TelemetrEZ

Posted: Sun Sep 28, 2014 2:56 am
by LTMNO
Its all good.
I was doing some research on how to ressurect a Attiny1634 and I read an article if you slow down the clock enough you can bring it back to life by erasing and then bringing up the clock speed again.

That being said, i tried with USBASP from SP
A seperate USBASP
and a AVRISPMKII.

No luck, it seems that the board is dead.

is there an easy way to test that?

Re: Introducing: TelemetrEZ

Posted: Sun Sep 28, 2014 2:59 am
by LTMNO
s_mack wrote:
LTMNO wrote:With TeZ removed... AIL/THR switches work.

We need to debug how to check if TeZ is working?
You'll get those switch errors if:

1) Your 9x doesn't have supporting firmware
2) Your TelemetrEZ's firmware is incorrect
3) Something's hooked up incorrectly
4) Something's wrong with the unit

How to figure out what's what? There's no simple method other than deductive elimination.

1) Make sure you have appropriate firmware on your 9x. That means the Frsky variant of ER9X or telemetrez option selected in OpenTX. If you've only tried one, then try the other and/or roll back to an older version to make sure something didn't get broken in a firmware update.
2) A common mistake is to write the HTML file to tEZ rather than the hex file itself.
3) Pictures help
4) How to know? The only practical way I can think of is to get a new TelemetrEZ and try it. If the problem is magically resolved, then something's wrong with the original. If not, then its something else.
1)Well, I can run OpenTx and ER9x
2)I can't program the Tez to put any firmware on it.
3)Nothing has changed in the hookup that worked before programming.
4)Perhaps something might be wrong with the unit as in, I might be the first to fry a unit by fusing m128 with power on or off?

Can I test if it is powering on? or working via tester, etc?

Re: Introducing: TelemetrEZ

Posted: Sun Sep 28, 2014 3:00 am
by LTMNO
p.s. here is the method that I tried.
http://www.evilmadscientist.com/2007/fi ... on-an-avr/

Re: Introducing: TelemetrEZ

Posted: Sun Sep 28, 2014 4:43 am
by Kilrah
LTMNO wrote: When fusing the m128 with power on and accidentally did it with power off... is what i suspected bricked my TeZ.
That, with the -F option, will have programmed the m128 fuses into the t1634.
A tiny bit of bad luck and you're either setting the fuse to disable further reprogramming, or just selecting a non-existant clock source.

This might help, although it might not be easy to access the pins on a soldered SOIC chip: https://sites.google.com/site/waynehold ... fuse-reset

Re: Introducing: TelemetrEZ

Posted: Sun Sep 28, 2014 5:14 am
by s_mack
LTMNO wrote:1)Well, I can run OpenTx and ER9x
You seem to be skipping over a very important detail, so I want to drive the point home... it must be SUPPORTING firmware. Vanilla OpenTX or ER9x will result in the switch errors. It must be ER9x-Frsky variant or OpenTX with the telemetrez option specifically enabled.

Another thing that came to mind: you are using multiple programmers and avrdude directly, etc... perhaps this comes down to the avrdude config file. The default config file DOES NOT contain the necessary data for this chip. The one that comes with my programming tool (from earlier in this thread) does. I might suggest that you find a computer that does not have (and never has had) avrdude (or any related software) installed, and start fresh.

Re: Introducing: TelemetrEZ

Posted: Sun Sep 28, 2014 9:43 am
by MikeB
Writing the '128 fuse settings to the '1634 will configure the '1634 to use the external crystal.

Mike.

Re: Introducing: TelemetrEZ

Posted: Sun Sep 28, 2014 1:40 pm
by LTMNO
Kilrah wrote:
LTMNO wrote: When fusing the m128 with power on and accidentally did it with power off... is what i suspected bricked my TeZ.
That, with the -F option, will have programmed the m128 fuses into the t1634.
A tiny bit of bad luck and you're either setting the fuse to disable further reprogramming, or just selecting a non-existant clock source.

This might help, although it might not be easy to access the pins on a soldered SOIC chip: https://sites.google.com/site/waynehold ... fuse-reset
I found that too... it was a thought to put that together. I might do so afterwards but i am ordering a new TEZ just in case.

Re: Introducing: TelemetrEZ

Posted: Sun Sep 28, 2014 1:45 pm
by LTMNO
s_mack wrote:
LTMNO wrote:1)Well, I can run OpenTx and ER9x
You seem to be skipping over a very important detail, so I want to drive the point home... it must be SUPPORTING firmware. Vanilla OpenTX or ER9x will result in the switch errors. It must be ER9x-Frsky variant or OpenTX with the telemetrez option specifically enabled.

Another thing that came to mind: you are using multiple programmers and avrdude directly, etc... perhaps this comes down to the avrdude config file. The default config file DOES NOT contain the necessary data for this chip. The one that comes with my programming tool (from earlier in this thread) does. I might suggest that you find a computer that does not have (and never has had) avrdude (or any related software) installed, and start fresh.
Steven,
that is not the case, ( there are switch errors )
i am specifying which config to use via the '-C' switch in avrdude.
the one that ships with your application is the one i am using.
The TeZ is dead. that is a fact. as it is not able to be programmed from external programmer, internal to SP board and AVRispMKII.
Don't get me wrong, you created a great product, and i have broken it, i take full responsibility for that.. hence why i am ordering a new one.
I can run the OS (ER9x or OpenTX) the TEZ is not working.. this is not firmware switches on the OS Side.
I appreciate the out of the box thinking though.
If i had $20 to spare and just wanted to duplicate the experiment, i would to prove out the use case for killing a TEz ;-)

Re: Introducing: TelemetrEZ

Posted: Sun Sep 28, 2014 1:46 pm
by LTMNO
MikeB wrote:Writing the '128 fuse settings to the '1634 will configure the '1634 to use the external crystal.

Mike.
Hi Mike, what does that mean...? Is there simple way to fix that?
or
Do i build out the Reset 12V pump in Kilrah's Post. I am going to do that anyway if I can pull this all out of the radio.

Cheers.

Re: Introducing: TelemetrEZ

Posted: Sun Sep 28, 2014 1:52 pm
by MikeB
I think you have configured the '1634 to use an external crystal of 8MHz or over. Now on the board, I also think you will find three pads labelled "RESONATOR". If so, you should be able to get the '1634 running by addibng either an 8MHz resonator to those 3 pads, or an 8MHz crystal to the outer two pads. THis should then enable you to set the fuses back to their defaults and then flash the chip.

Mike.

Re: Introducing: TelemetrEZ

Posted: Sun Sep 28, 2014 2:04 pm
by LTMNO
Hi Mike,
I might have a Crystal.. But I can get a resonator.
I see the Resonator Pads.. where is the Crystal Pads?
The 2 circles beneath the 3 Sqaures under the D1 Resonator Label?

Image