XJT, X8R firmware update using 9xrpro

ersky9xr is the port of the er9x firmware to the 9XRPRO radio.
Post Reply
rszasz
Posts: 29
Joined: Fri Jan 23, 2015 6:47 am
Country: -

XJT, X8R firmware update using 9xrpro

Post by rszasz » Sat Mar 21, 2015 4:00 pm

I saw that an option to Update SPort was added and wondered if I can just connect my XJT and X8R via sport and update each by connecting the x8r to the xjt with an S.Port cable while the xjt is installed on the 9xrpro.

does anyone know if this would work? It certainly would be easier than connecting to the TX module pins on the 9xrpro


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

Re: XJT, X8R firmware update using 9xrpro

Post by MikeB » Sat Mar 21, 2015 5:29 pm

To update the firmware on a SPort device, it must be the only Sport device on the SPort. This means you can only update a receiver or sensor if the XJT module is NOT plugged in. In addition, even the XJT needs to be external as it only looks for a possible firmware update request for a short time after it is powered on.

I wrote some instructions on how to do these updates, you will find them here:
viewtopic.php?f=118&t=4612&p=85771&hili ... ash#p85771

Edit: Use the first wiring diagram as the 9XR-PRO has a SPort interface.

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

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

Re: XJT, X8R firmware update using 9xrpro

Post by MikeB » Sat Mar 21, 2015 8:05 pm

Thinking about how the 9XR-PRO works, you can avoid using an external battery by doing the following.

Start the 'PRO by plugging a trainer cable into the JR trainer socket. Do this while holding the two horizontal trims apart. It should start in maintenence mode, but with the RF power off. Select the file and start the firmware update, then switch the power switch ON. This should then provide power to the module bay power pin.
An XJT module should therefore be directly updateable. Note that for other SPort devices, they may be limited to 10V maximum so only use this method for them if your radio battery is less than 10V.

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

rszasz
Posts: 29
Joined: Fri Jan 23, 2015 6:47 am
Country: -

Re: XJT, X8R firmware update using 9xrpro

Post by rszasz » Sat Mar 21, 2015 11:18 pm

Getting a not allowed for viewing that link

I should be able to start the 9xrpro in firmware upgrade mode with the xjt unplugged, plug it in and hit update? And for the receiver I need to connect to the lowest 3 pins in the back of the 9xr, (I have to lookup the order, but a three pin connector should get power,ground and signal?)

rszasz
Posts: 29
Joined: Fri Jan 23, 2015 6:47 am
Country: -

Re: XJT, X8R firmware update using 9xrpro

Post by rszasz » Sat Mar 21, 2015 11:55 pm

Unplugging, starting the process, plugging the xjt module in while it said finding sport device seems to have worked


Addendum:

Or not... It went to the "Update sport. Flashing" but the progress bar does not move,, trying again, once it went to about 10%, turning the power off after entering the update mode, then turning it on when finding device seems to work too, but still no joy on a completed update

Double addendum: annnnd, not able to rebind to receiver... How badly have I screwed up?


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

Re: XJT, X8R firmware update using 9xrpro

Post by MikeB » Sun Mar 22, 2015 9:06 am

I've reposted the instructions on this post:
viewtopic.php?f=45&t=6847#p94700.

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

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

Re: XJT, X8R firmware update using 9xrpro

Post by MikeB » Sun Mar 22, 2015 10:28 am

Don't panic, you are in a better place than I am. I just wired an X6R up the wrong way round and blew the RF section! It still updates the firmware though so is OK for this testing.

I can re-produce a failed flash attempt from the 'PRO. I'll look into the problem this evening. After a failed attempt, I successfully flashed it from a Taranis, so yours should recover.
It may take a little while to locate the problem.

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

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

Re: XJT, X8R firmware update using 9xrpro

Post by jhsa » Sun Mar 22, 2015 10:36 am

I can see I'm not alone on the "blowing receivers up" club. :mrgreen: it's actually something I'm very good at :) :)
I do it for fun (not) so I can just repair them again after :mrgreen:
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: 17374
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: XJT, X8R firmware update using 9xrpro

Post by MikeB » Sun Mar 22, 2015 10:23 pm

I think I have fixed this problem. I was getting failures, although occasionally it worked. With this fix it just worked twice in a row, no failures.

I've posted it here: viewtopic.php?f=7&t=4676&p=65894#p65894

I can't see anything obviously wrong with the receiver, but it no longer binds.

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

rszasz
Posts: 29
Joined: Fri Jan 23, 2015 6:47 am
Country: -

Re: XJT, X8R firmware update using 9xrpro

Post by rszasz » Mon Mar 23, 2015 7:31 am

On first attempt, loading has stopped with one row of pixels remaining. Will retry

Worked on second attempt, will try binding, and will reflash receiver if binding doesn't work

Editing to say flashing the xjt seemed to work on second go, now making a cable (gnd and signal only powering off a receiver bat) to flash the x8r

rszasz
Posts: 29
Joined: Fri Jan 23, 2015 6:47 am
Country: -

Re: XJT, X8R firmware update using 9xrpro

Post by rszasz » Mon Mar 23, 2015 8:19 am

The X8R seems to be having a similar problem in being flashed

While flashing I get solid green intermittent red, when the flash fails it goes to quick flashing red only

I really should order a buspirate like I've planned so I can see what's going on.

Took a few tries but binding works with the latest firmware on both xjt and x8r, will remember to have the cable with me so I can flash new receivers if needed.

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

Re: XJT, X8R firmware update using 9xrpro

Post by MikeB » Mon Mar 23, 2015 9:07 am

I'll try to do some more testing today.

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

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

Re: XJT, X8R firmware update using 9xrpro

Post by MikeB » Mon Mar 23, 2015 5:13 pm

I think I can see the problem. The SPort bus is a single wire, with data sent in both directions. To do this, the radio output has to be enabled while it is sending data, and then disabled when the last byte has been sent.
The disable operation is handled by an interrupt. The device being updated starts sending only a short time after receiving the last byte, although the exact amount of time varies a bit from around 38uS after the end of the transmission to 70 or 80uS later.
I can see on my 'scope an occurance when the update fails where the output disable is 56uS after the end of transmission, and the updating device has already started sending data back, 14uS before the disable signal occurs. This almost certainly causes the start bit to be mistimed. I can see this also in some debug where the first byte, that should be 0x7E (01111110 in binary) is received as 0x3F (00111111). Data is sent least significant bit first, the the first 0 is being lost as it is treated as the start bit, and the following bits are shifted 1 place.

Every time the update fails my debug showed either 0x3F or 0xBF (10111111) as the first received byte.
Something, I'm not sure what, is holding the interrupt off for too long.

Mike.

Edit: Found it! The regular 5mS interrupt was too high an interrupt priority. I've put that to a lower priority than the serial interrupt and now the serial disable looks rock solid on my 'scope. I've now flashed the Rx 8 times in a row with no failures. I'll remove all my debug and post a test version a bit later today.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

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

Re: XJT, X8R firmware update using 9xrpro

Post by MikeB » Mon Mar 23, 2015 7:20 pm

I've just posted a new test version of ersky9xr_rom.bin with a 'proper' fix for the SPort updating problem.
See here:
viewtopic.php?f=7&t=4676#p65894

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

rszasz
Posts: 29
Joined: Fri Jan 23, 2015 6:47 am
Country: -

Re: XJT, X8R firmware update using 9xrpro

Post by rszasz » Mon Mar 23, 2015 9:00 pm

It's working great. updating without any glitches now

And binding works fine when both TX and RX are updated to latest firmware

rszasz
Posts: 29
Joined: Fri Jan 23, 2015 6:47 am
Country: -

Re: XJT, X8R firmware update using 9xrpro

Post by rszasz » Mon Mar 30, 2015 6:16 pm

Is there any chance something like this will allow us to do things like assign sport servo channel numbers, or battery number settings on battery sensors? Are those things possible just daisy chaining them from the back of the XJT or do they need to be the only things on the bus? I'm a long way from needing such features, but the idea of having the 9xrpro eliminating a handful of kit is enticing.

User avatar
Kilrah
Posts: 10843
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: XJT, X8R firmware update using 9xrpro

Post by Kilrah » Mon Mar 30, 2015 8:13 pm

The device needs to be the only one on the bus.

If someone gets us the protocol, no problem.

Irish Steve
Posts: 149
Joined: Thu Dec 29, 2011 10:04 pm
Country: -
Location: Ashbourne Co Meath

Re: XJT, X8R firmware update using 9xrpro

Post by Irish Steve » Tue Aug 18, 2015 9:06 pm

MikeB wrote:To update the firmware on a SPort device, it must be the only Sport device on the SPort. This means you can only update a receiver or sensor if the XJT module is NOT plugged in. In addition, even the XJT needs to be external as it only looks for a possible firmware update request for a short time after it is powered on.

I wrote some instructions on how to do these updates, you will find them here:
viewtopic.php?f=118&t=4612&p=85771&hili ... ash#p85771

Edit: Use the first wiring diagram as the 9XR-PRO has a SPort interface.

Mike.
Mike, sorry, I'm getting confused here, I've realised that we should update our FRSKY modules, and I found this thread, but can't link in to the post, the forum software won't let me have access, and the later link is referring to OpenTX, which we're not using.

I'm about to upgrade the 2 transmitters to release 217, which will be a separate exercise, and then sort out the FRSKY modules, (2 of them) and 4 receivers, to get everything into Sync, and legal, just in case anyone decides to check on what we're using, having used our gear indoors for testing and initial set up, we're about to move outdoors and may be sharing the space with other flyers, so we want to make sure we're not about to have any problems with either the radios or the regulators.

So, given that I'm averse to Youtube tutorials, I prefer to have clear instructions either on the screen or a piece of paper, and work through the steps with a tick as their done if it's complex, is there a clear thread that gives how to upgrade the DJT modules, and the X8R receivers with the new European software?

Thanks
Irish Steve

If it was easy, shure, would't we all be doin it?

_

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

Re: XJT, X8R firmware update using 9xrpro

Post by MikeB » Tue Aug 18, 2015 9:54 pm

Here is the document referenced above:
SportFlash.pdf
(95.29 KiB) Downloaded 323 times
That should give all the info. you need. Use the first diagram, with an external power supply to the device and be sure you use the correct connections.

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

Irish Steve
Posts: 149
Joined: Thu Dec 29, 2011 10:04 pm
Country: -
Location: Ashbourne Co Meath

Re: XJT, X8R firmware update using 9xrpro

Post by Irish Steve » Wed Aug 19, 2015 12:28 am

MikeB wrote:Here is the document referenced above:
SportFlash.pdf
That should give all the info. you need. Use the first diagram, with an external power supply to the device and be sure you use the correct connections.

Mike.
Thanks for the quick reply, that fills in the gaps, and yes, I should be able to make sense of it all now. Glad I kept the old battery carrier for the TX's, looks like using them will be safer than using the LiFe batteries, just in case.
Irish Steve

If it was easy, shure, would't we all be doin it?

_

rszasz
Posts: 29
Joined: Fri Jan 23, 2015 6:47 am
Country: -

Re: XJT, X8R firmware update using 9xrpro

Post by rszasz » Tue Nov 03, 2015 2:32 pm

On an unmodified 9xr pro the 4th pin from the bottom is regulated 6v power right?

I made my programming cable to use (counting from bottom) pin 1, s.port, pin 2 GND, pin 3 NC, pin 4, +6v power

hopefully that wasn't too risky.

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

Re: XJT, X8R firmware update using 9xrpro

Post by MikeB » Tue Nov 03, 2015 2:55 pm

No. We normally count the pins from the top:
Pin 1 - top - PPM/PXX
Pin 2 Unused or serial dat to module
Pin 3 - centre - Power, this is not usually regulated and is battery voltage.
Pin 4 0V (ground).
Pin 5 - bottom - Sport or serial data from module.

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

rszasz
Posts: 29
Joined: Fri Jan 23, 2015 6:47 am
Country: -

Re: XJT, X8R firmware update using 9xrpro

Post by rszasz » Wed Nov 04, 2015 6:01 pm

My error, I had a combination of remembering incorrectly and looking at a pinout that is obviously incorrect.

looks like I was taking a bit of a risk and powered from the 11.5v or so of the li-fe battery pack. I should have just put a 5v regulator in the cable.


Post Reply

Return to “ersky9xr”