9X + FrSky-TelemetryMod flashes only with Back-Cover removed

Post Reply
NebuK
Posts: 18
Joined: Fri Sep 06, 2013 10:02 am
Country: -

9X + FrSky-TelemetryMod flashes only with Back-Cover removed

Post by NebuK »

Hello,

i have a really strange problem with my 9X and flashing with a USB-ASP. The device is this one:
http://slackworld.org/blog/wp-content/u ... lcsoft.jpg
I use a FrSky module in the 9X and i have modified the 9X with the "no RS232"-Telemetry-Hack described here:
http://www.rcgroups.com/forums/showthread.php?t=1510047
If i understand correctly, this relocates the switches routed to MOSI/MISO to the unused pins at the top of the AVR and cuts the MOSI/MISO traces. Then, the back-PCBs traces for 2 unused pins at the module-connector are cut, and those pins are routed to the MOSI/MISO at the AVR. The modification inside the FrSky-Module don't interest here, since my problem arises with module removed or installed alike.
I have also applied the speaker mod, this: http://openrcforums.com/wiki/index.php/Speaker_Mod with a relatively small non-selfdriven piezo speaker. I hope that i can also rule this one out, as its on the front-board which is not disconnected during the successful flashing attempts. The mod itself, i believe, bypasses the transistors driving the original speaker and simply connects the signal-driven (instead of voltage-driven) piezo together with a dc-blocking cap directly to the related AVR pin? Is this right? So anyways, if its not drawing excessive current beyond usb supply abilities, it shouldn't pose a problem, right?

The problem i am experiencing is that i can flash the 9x with my USB-ASP without any problem with the back cover removed electrically (by means of pulling that large plug) and mechanically, so that the GND-connector-spring doesn't have any contact. If i install the back either mechanically (connect GND only by spring) or electrically or both, flashing fails with:

Code: Select all

=================================================================================
Started AVRDUDE
/usr/bin/avrdude -c usbasp -p m64 -U eeprom:r:/tmp/temp.hex:i
=================================================================================

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.


=================================================================================
AVRDUDE done - exit code 1
=================================================================================
With the back installed, I have tried:
- VCC-To-Target on 5V
- No VCC-To-Target and transmitter turned on on battery
- VCC-To-Target + Battery
- RST-Line tantalum capacitor removed and installed
and all of them fail with the same error. I can hear the TX beeping (at reset-time) upon starting to flash, and a 2nd time when the error shows up. From this i conclude that pulling reset somehow did work? (i hope...?).

I'd be really grateful for any hints on what to try, and what i could do to debug this...
Thanks in advance! And best Regards!
-Dario Ernst

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

Re: 9X + FrSky-TelemetryMod flashes only with Back-Cover rem

Post by rperkins »

NebuK wrote:Hello,
. The modification inside the FrSky-Module don't interest here, since my problem arises with module removed or installed alike.
That's good information.
I'll try to look over the thread you referenced this weekend.

did you try removing the metal 'wing' thing. or at least put a little tape across where it ties the two halves together to see if that causes the trouble. that would help isolate the problem and I'm pretty sure I read you can remove those things.

There are a lot of FrySky users on here, so I think you are in the right place
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: 9X + FrSky-TelemetryMod flashes only with Back-Cover rem

Post by jhsa »

One of my radios has the metal thingy removed and it works fine.. That only connects both parts to ground.. Can't see why connecting the back board to ground would prevent the flashing of the fw, specially when the big connector that connects both halves is not connected as you said..

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
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: 9X + FrSky-TelemetryMod flashes only with Back-Cover rem

Post by rperkins »

jhsa wrote:Can't see why connecting the back board to ground would prevent the flashing of the fw, specially when the big connector that connects both halves is not connected as you said..
João
Yes i missed the either/or part
NebuK
Posts: 18
Joined: Fri Sep 06, 2013 10:02 am
Country: -

Re: 9X + FrSky-TelemetryMod flashes only with Back-Cover rem

Post by NebuK »

Hi,

i did already try to mask the metal-spring-thingy with electrical tape to isolate it. This did unfortunately not help at all. The error also arises when the backside-PCB of the transmitter is connected through that one rather wide connector to the mainboard.

What i really also don't understand is why connecting ground only (via spring) raises the problem.

By gut feeling, i'd say something's wrong with RST when its connected. Does anybody happen to know where the line from the pin thats also RST is routed?

Thanks for your answers and help so far!
-NebuK

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

Re: 9X + FrSky-TelemetryMod flashes only with Back-Cover rem

Post by MikeB »

When you did the telemetry mod to the back board at the 5-pin connector to the module, did you remove the board and cut connections to pins 2 and 5 on the other side of the board?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
NebuK
Posts: 18
Joined: Fri Sep 06, 2013 10:02 am
Country: -

Re: 9X + FrSky-TelemetryMod flashes only with Back-Cover rem

Post by NebuK »

Hi Mike,
MikeB wrote:When you did the telemetry mod to the back board at the 5-pin connector to the module, did you remove the board and cut connections to pins 2 and 5 on the other side of the board?
Good call, i fear it turns out i did not. I have measured the two telemetry pins at the module connector versus all of the connector backbord->mainboard pins, and found one connection (2nd-left back->main pin to 2nd-top module-connector pin) . I cut the trace of that one connection and measured again to make sure.

I have also found a documentation of an equivalent of my USB-ASP at:
https://www.protostack.com/download/Use ... 2.0%29.pdf
and found that JP3 is Slow-SCK. I have closed that connection with a bridge and tried to program again with back removed / back installed.

The symptoms however remain, and i cannot program with backside connected ;(.

Thanks for your help so far!
Best Regards
-Dario Ernst
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: 9X + FrSky-TelemetryMod flashes only with Back-Cover rem

Post by MikeB »

I suggest removing the two telemetry connections to the module connector and trying again.

I haven't checked the original mod, bit I would suggest fitting a resistor in the signal from pin 5 to the processor to prevent the module serial Tx output from affecting the programming pin.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
NebuK
Posts: 18
Joined: Fri Sep 06, 2013 10:02 am
Country: -

Re: 9X + FrSky-TelemetryMod flashes only with Back-Cover rem

Post by NebuK »

MikeB wrote:When you did the telemetry mod to the back board at the 5-pin connector to the module, did you remove the board and cut connections to pins 2 and 5 on the other side of the board?
I suggest removing the two telemetry connections to the module connector and trying again.
Okay, i have tried removing the telemetry cables (telemetry, by the way, was working like a charm!) and tried ... works, even with back attached. Then i reatteched telemetry, and started to measure again. I found the top telemetry pin connected to ground as well as MOSI! (and yes, on the backside of the back-PCB) I have no idea how i could measure without finding this before! I am sure i put the probes onto both ... my multimeter always needs ~1-2 sec to start beeping, so maybe i waited to short.

Long story short, i can now flash without any problems with the back attached, and telemetry attached! Thanks a LOT! You really really helped me identify the problem. One thing i don't understand is why Telemetry was working at all?!?

But, as always, one Problem solved, the other one arises. The 9X still boots just fine and shows the eeprom nicely, but ... for some reason, i get:

Code: Select all

companion9x: /home/romolo/production/companion9x/src/file.cpp:326: unsigned int EFile::readRlc12(uint8_t*, unsigned int, bool): Assertion `m_bRlc & 0x7f' failed.
trying openTx for 9X board import... version 213 variant 3Aborted
when reading the eeprom/hex file with Companion9X(1.52, rev 2387). Again, after trying to debug with gdb and reading that file a little ( http://code.google.com/p/companion9x/so ... le.cpp#326 ), i can not guesstimate whats wrong here.

Would you care to help me one last time with this?

THANK YOU SO MUCH! Best Regards
-NebuK
User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: 9X + FrSky-TelemetryMod flashes only with Back-Cover rem

Post by rperkins »

Mike would be the man for that one. My guess is last time you flashed your radio it was with an earlier version of companion9x and now the new version is choking on trying to upgrade the older eeprom data structure. Just a guess.

Glad you got your other trouble sorted out.
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: 9X + FrSky-TelemetryMod flashes only with Back-Cover rem

Post by Kilrah »

I don't see a reference in your posts to what firmware and revision you're trying to use. That would be essential to understanding the issue.
NebuK
Posts: 18
Joined: Fri Sep 06, 2013 10:02 am
Country: -

Re: 9X + FrSky-TelemetryMod flashes only with Back-Cover rem

Post by NebuK »

Hi,

i fear i'm running into a new problem here. I've been using a version from someone who patched it with vario-sink-tones patched in again (see https://github.com/opentx/opentx/issues/79 ), so no big suprise something's wrong there. Thing is, i've also tried to build RELEASE-r2923 (the git tag), flash that. With that and a clean eeprom, reading it with companion9x works again. After restoring my original model definitions with companion9x, the TX would always say "bad eeprom" and delete it again. I have now used companion to download an "official" binary ... which works. I'd guess the binaries offered by companion are the latested RELEASE-tag, so the same as my build(??).

I'm building with the binutils-avr, gcc-avr and avr-lic from debian testing, its: avr-gcc-4.8-2, binutils-avr-2.23.1-2, avr-libc-1.8.0-4.

I fear i'm running into a whole different problem now ... ;/. Doesn't it ever end? I only want to somehow get vario sinking tones back ;[].

Thanks for your great help! Best Regards
-Dario Ernst
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: 9X + FrSky-TelemetryMod flashes only with Back-Cover rem

Post by Kilrah »

The current binaries supplied by companion are r2940 out of the googlecode svn. Github-based bins will only be distributed from next release on.
That said 2923 should work just the same as 2940 in terms of eeprom, no changes there. Your patched firmware should likely be OK too.

BUT remember that the eeprom format depends on the selected options, so you need to make sure the options selected in companion match those that have been selected for the firmware that is on the radio. And if you want to restore the eeprom "directly" (i.e. write from file, without conversion), you need to make sure that the options in the firmware are the same as those that were in the firmware the file was saved from.
NebuK
Posts: 18
Joined: Fri Sep 06, 2013 10:02 am
Country: -

Re: 9X + FrSky-TelemetryMod flashes only with Back-Cover rem

Post by NebuK »

Hey,

i forgot to write one thing: I did read eeprom from tx, open the old eepe file, copy-pasted the contents over from old to new, then wrote those new contents to tx -> bad eeprom.

You wrote something about conversion -- how exactly would that work?

Thanks!
-NebuK

PS: Sorry, just found where C9X says which version its going to download ... sorry to have overlooked it!
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: 9X + FrSky-TelemetryMod flashes only with Back-Cover rem

Post by Kilrah »

NebuK wrote:i forgot to write one thing: I did read eeprom from tx, open the old eepe file, copy-pasted the contents over from old to new, then wrote those new contents to tx -> bad eeprom.
Then the firmware options in companion9x preferences don't match the options in the firmware that is on the radio.
Choose options, save, download firmware, flash firmware, then open old eeprom in c9x, and write to radio. That way you're sure they're correct.
NebuK
Posts: 18
Joined: Fri Sep 06, 2013 10:02 am
Country: -

Re: 9X + FrSky-TelemetryMod flashes only with Back-Cover rem

Post by NebuK »

Kilrah wrote: Then the firmware options in companion9x preferences don't match the options in the firmware that is on the radio.
Ah! This is the advice that i needed, i believe. I now synced the Companion9X preferences to my Makefile, and shwoosh! It works! I can now read and display eeprom in C9X, as well as write my old model files to the transmitter.

Wow, thanks!
-NebuK

Post Reply

Return to “PROGRAMMERS”