ERSKY9X Coding

erskyTx runs on many radios and upgrade boards
ersky9x was a port of er9x for use on the sky9x board.
User avatar
jhsa
Posts: 19370
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: ERSKY9X Coding

Post by jhsa » Tue Apr 25, 2017 10:44 pm

ozphoenix wrote:
Tue Apr 25, 2017 9:40 pm
I second this request! Good thought, João!

Though, I think the switch source needs to be selectable, as I currently have the only momentary switch on the 9XRPro already in use during flight for several models (think: occasional telemetry and/or panic/auto-level mode, etc).
You should be able to select any of the switches..

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
jhsa
Posts: 19370
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: ERSKY9X Coding

Post by jhsa » Wed Apr 26, 2017 12:24 am

Yep that works, thanks for the idea.
GVAR Adjusters
GV1 Inc/0 PB2 (inc) PB3 (zero)

GVAR increases by one each time I hit the momentary switch PB2, and if i want to zero the counter, I just hit PB3.

But the way I had in mind we wouldn't have to program GVARS every time we want to set a marker. We would just need to set a switch in the logging menu. It would make it easier, that's all.
Sometimes there are some glitches that we may want to look at. For example, i wish i had this when we were trying to find out why the radio was receiving voltage values for unused cells when connected to the openXsensor. This triggered a low cell voltage alarm when there was no problem at all :)

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: 17187
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB » Wed Apr 26, 2017 8:25 am

I've added the idea to my "ToDo" list!

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

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

Re: ERSKY9X Coding

Post by jhsa » Wed Apr 26, 2017 8:45 am

Thank you..

João

Sent from my thor using Tapatalk

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: 17187
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB » Wed Apr 26, 2017 4:10 pm

The next test version will, at least, log the stick positions (if set in the logging menu).
I'll need to fiddle a bit to add switches as different transmitters clearly have different numbers of pots and switches and types of switch.

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


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

Re: ERSKY9X Coding

Post by jhsa » Wed Apr 26, 2017 4:14 pm

Thanks Mike.. I guess the next test version will also have the delay on the Logical switches so others can also test it?
If so, will it still have the delays at the bottom of the menu?

Thank you

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: 17187
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB » Wed Apr 26, 2017 4:24 pm

Yes!

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

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

Re: ERSKY9X Coding

Post by jhsa » Wed Apr 26, 2017 4:40 pm

Thanks..

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
jhsa
Posts: 19370
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: ERSKY9X Coding

Post by jhsa » Sat Apr 29, 2017 9:34 pm

Mike, I have seen an odd behavior today while at the field.. I gotta say that the last time I was there was on the 9th of April, and I haven't noticed any problem. I had "Prov221C5" installed on my 9XT. Now I have C8 but I see the same behavior. Attached is the model. Nothing changed since last time on the radio (this model), or the model itself. Didn't program anything on the model and also not the oXs.
The only thing i did different was finishing a flight and swap batteries immediately without turning the radio OFF as it was late and getting dark.
So, if i turn the model on after I turn on the radio the first time, all seems OK.
After flying (leave radio ON) disconnect the balance plug that also powers the oXs, I get an alarm on "TmOK<2" that tells me "Serial Connection Lost". This is OK.
But now if I connect a new battery, main plug first, as soon as I connect the balance plug that powers the oXs, i get lowest cell voltage alarm, and FasV alarm.
If i connect the main plug after the balance plug, all OK. But i don't like to do this.

Maybe some timing (delay) issue here??

Oh by the way, another old friend of ours is also back. The "cell 8 bug" :mrgreen: Please check the log file attached. Suddenly i had that low cell voltage alarm. The log shows Cell 8 suddenly showing 3.07V. Ctot and Cvlt go wrong for a while, but then they go back to normal values.. As I said, i didn't touch the model or the oXs. To program the oXs I have to open the model to get to it.. That involve removing some tape.. Anyway, it has been working for a while without problems, and I already flow this model for a few hours after that problem was supposedly fixed by increasing some "SEND DATA" timing in the oXs code..

Thanks

João
Attachments
Easystar.eepm
(4.36 KiB) Downloaded 149 times
Easystar-2017-04-29.csv
(118.84 KiB) Downloaded 142 times
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

ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix » Mon May 01, 2017 10:33 am

As always happens, when you want something to happen, it does not.

I flew yesterday, but only one flight when I was using extensive telemetry-related audio. However, no audio fails to report on that one flight.

I'll keep monitoring and report back when I have something noteworthy.

Regards,
ozphoenix
ozphoenix wrote:
Sun Apr 23, 2017 11:15 am
Thanks for the quick response.

The SD is 4GB, the cluster/allocation unit size is 32kB (note that I already used SD Card Formatter, as recommended).

In collecting the files for posting, I noticed that that I need to listen more carefully to make sure at which point in the audio it is freezing and be sure I have all of the correct files collected - now that I need to be more exact, I recall I was flying four models today and two had audio problems (today or in the past) - I need to be sure which one I collect from.

I'll get back with a later post in a week or so after I've had time to fly again.

Thanks, again.

ozphoenix.
jhsa wrote:
Sun Apr 23, 2017 9:28 am
That is the typical symptom of a not large enough cluster.
Make sure your SD Card is at least 4Gb in size so it is able to have a cluster size of 32.
Format it with the "SD Card Formatter" utility, no Windows..

João

EDIT: If that doesn't solve the problem, please post the audio files here..

Sent from my thor using Tapatalk

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

Re: ERSKY9X Coding

Post by jhsa » Mon May 01, 2017 11:33 am

I know that feeling.. :(

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

ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix » Mon May 01, 2017 11:49 am

:lol:
jhsa wrote:
Mon May 01, 2017 11:33 am
I know that feeling.. :(

João

ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Ersky9x Bootloaders

Post by ozphoenix » Wed May 03, 2017 9:35 am

Mike,
For each of the versions of boot loader, back to (say, about) v1.4 (to take a stab at what might still be around at my club) are there different ways to get into the MAINTENANCE menu? That is, in v2.1 (not v2.2!), it's '....hold both trim switches out and power on'.
In earlier versions, are there another ways? I notice some difference ages of device in several 9XRPro units I have seen at my club and I am being asked to 'do the latest upgrades....' to several (as noted in other posts of mine here). A couple have old (e.g. V1.7) boot loaders and a (very) brief look at one or two seems to show that I cannot get to the MAINTENANCE menu by the 'V2.1' (not V2.2!) method (above). I plan to update the boot loader as well as the Ersky9X and don't want to mess around trying to find out each different menu access path, if there is more than one :(

Thanks in advance.
ozphoenix

EDIT: Where I wrote 'v2.2' above, should have been 'V2.1'.
Last edited by ozphoenix on Wed May 03, 2017 8:44 pm, edited 2 times in total.

ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Backing up EEPROM

Post by ozphoenix » Wed May 03, 2017 9:59 am

Mike,
In the recent past few weeks, I have backed up my EEPROM successfully several times.

Today, I have successfully backed up some models, I have also plugged in the USB and transferred a new sound file to the card (so I know I can write to the SD card and I also have plenty of free space). Then I enabled the Hardware menu and tried to back up my EEPROM - got a message 'Preparing', then 'WRITE ERROR'. I re-seated the SD card - same thing.

Turned everything off, waited a few minutes while I wrote the first part of this email (above), have now re-booted with Hardware Menu enabled and was able to save EEPROM without error. Left the radio on and waited 2-3 minutes, then tried to backup EEPROM again (without intervening power-off/power-on), got the same WRITE ERROR - weird :(

SD CARD STAT shows PRESENT, Ready and cluster size 32.

I know I'm tired right now, but I think I'm doing it right. What am I missing?

Regards,
ozphoenix

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

Re: ERSKY9X Coding

Post by MikeB » Wed May 03, 2017 12:32 pm

The bootloader and "maintenance mode" are two different things.
You access the bootloader by holding the two horizontal trims towards the centre.
You access the "maintenance mode" by holding the two horizontal trims apart.
This has never been changed.

I'll look into the backup EEPROM.

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

ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix » Wed May 03, 2017 8:43 pm

Ah, good - ok, thanks - now clear.

And, at what point or version of Ersky9x was the 'Hardware Menu Enabled' option (left trim held left on power-up) added?

Regards,
ozphoenix

P.S. Even weirder - this morning, the Backup EEPROM option worked flawlessly three times in a row on first try, then twice in a row on second power-cycle - no errors. My radio must have had the gremlins in it last night :(
MikeB wrote:
Wed May 03, 2017 12:32 pm
The bootloader and "maintenance mode" are two different things.
You access the bootloader by holding the two horizontal trims towards the centre.
You access the "maintenance mode" by holding the two horizontal trims apart.
This has never been changed.

I'll look into the backup EEPROM.

Mike.

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

Re: ERSKY9X Coding

Post by MikeB » Wed May 03, 2017 11:50 pm

Looks like it was r219 when it was officially released, and in test versions from (no later than) Jan 2016.

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

ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix » Thu May 04, 2017 12:37 am

Ok, many thanks for the quick response.
MikeB wrote:
Wed May 03, 2017 11:50 pm
Looks like it was r219 when it was officially released, and in test versions from (no later than) Jan 2016.

Mike.

silpstream
Posts: 2
Joined: Mon Feb 27, 2017 6:36 am
Country: -

Re: ERSKY9X Coding

Post by silpstream » Mon May 08, 2017 5:33 pm

Hi guys,

I have a 9xr pro as well as a 9x with JK's ar9x board. I was looking into extra input options for both (more analog inputs actually) but realised that it is limited to AD10 on the 9xr pro and ad8/10 on the ar9x.

I also read up about the sky9x board, and it having an ATTINY167 coprocessor which gives it RTC, Temp, and 3 extra digital inputs on PB1, PB3 and PB6 of the ATTINY167. There was talk in the past of it being able to support much more, like extra analog inputs and extra LCD. I'm guessing that development on that front has stalled, since we are no longer able to buy the sky9x board.

Anyhow, this go me thinking about an easy way to add a coprocessor to the ar9x and 9xr pro. I took a clone digispark pro which has an ATTINY167 (I used a clone here as the original has a problem of AVCC and AGND being left unconnected. Also it only costs about $4 on aliexpress), and used avrdude to flash tiny boot.hex to it. I then hooked it up to my ar9x over i2c using 3v3 for vcc and went into maintenance mode to flash tiny.bin to it.

I then went back to hardware menu in ersky9x and deselected "ar9x board", and then went to view the coprocessor status in "version". I got "0107" which I assume is correct for the coprocessor as having a bootloader and running version 7 of tinyapp.bin.

Comparing the schematics of the digispark pro to the sky9x board coprocessor shows that everything is wired mostly the same except for the 16Mhz oscillator and a usb plug. I could probably desolder the 16Mz oscillator and solder on a 32k one instead, but this is probably not an option for the masses.

So, my question is, do you guys deem this as a potentially good solution to add even more functionality to the 9xr pro and ar9x? Given that it is essentially essentially adding the same coprocessor that we already have some code for, could this get supported and improved upon? It is an easy enough task to flash and plug into the i2c line (just slightly more effort than the RTC), and it can be plugged in concurrently with the RTC if the code supports it.

We could probably run this coprocessor without RTC and just use it for the extra pins it gives us. As well as fully realise the potential of having that coprocessor in the first place on the sky9x board.

Also, I saw a few pages back that you guys have gotten the ATSAM4S8CA upgrade working. Can this also be done to the 9xr pro already?

Thanks guys, especially Mike, for everything thats been put together. The firmware is great! And thanks JK for making a really affordable board that took my old 9x to a whole new level.

User avatar
RCHH
Posts: 465
Joined: Sun Jun 24, 2012 2:48 pm
Country: -
Location: Plymouth

Re: ERSKY9X Coding

Post by RCHH » Mon May 08, 2017 6:04 pm

Oh lordy ... more upgrades to get me spending money ... lol!!!
The simpleton asked "Hows about ErSky9X for Horus???". And the Genius from Dorset replied "Why not indeed? I shall get right onto it!" And then there was light on Horus! And it was good!

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

Re: ERSKY9X Coding

Post by MikeB » Mon May 08, 2017 6:15 pm

The ATSAM4S8CA may well work in a 9XR-PRO, although I haven't tried it. I tried it mainly as an upgrade to the SKY board as that only has 256K of flash (the 'PRO already has 512K).

The Tiny167 as an I2C addon is interesting. It does already do something with analog data as it returns a temperature that is an analog input. Clearly, it does send some RTC data, so I'm not sure it would operate with the RTC connected as well, as in the RTC would be updated from both.
The 32kHz crystal is only needed for the RTC on the Tiny167, it normally runs using the internal oscillator as the main clock.

There is some code in place to support a Mcp23008 I2C, digtal I/O device.

I've also got an Arduino programmed to act as a rotary encoder driver (mainly for the 9Xtreme board), also accessed over I2C.

There are three things to consider:
1. What hardware should be supported (over I2C) to provide extra I/O. (For ease of availablity I would tend to an Arduino).
2. How can ersky9x be made to easily configure and handle such extra I/O.
3. Have I got time to implement it all!!?

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

User avatar
RCHH
Posts: 465
Joined: Sun Jun 24, 2012 2:48 pm
Country: -
Location: Plymouth

Re: ERSKY9X Coding

Post by RCHH » Mon May 08, 2017 6:35 pm

...

3. Do not go to sleep again?

Heh heh!!!

:o :shock: :mrgreen: :lol: :lol: :lol: :P :P
The simpleton asked "Hows about ErSky9X for Horus???". And the Genius from Dorset replied "Why not indeed? I shall get right onto it!" And then there was light on Horus! And it was good!

silpstream
Posts: 2
Joined: Mon Feb 27, 2017 6:36 am
Country: -

Re: ERSKY9X Coding

Post by silpstream » Mon May 08, 2017 8:50 pm

1. I basically looked at the tiny167 since it was already the coprocessor on the sky9x, thus I assumed it might be easier to get going since an arduino-like board (the digispark) is available for it. I'm not crazy about the MCP23008 as it is mainly for digital IOs. A 3v3 arduino pro mini would be awesome, better than the tiny167 and probably cheaper to get hold of (plus I have a few lying around).

2. If this is primarily for switches and pots, then it seems that you've got a lot of that in place already through the hardware menu, similar to how we can select EXT4/5/6 if it is a sky9x board.

3. What RCHH said! lol. But actually I'd really like to help, if I can get my head around the code. I'll probably be bombarding you with some questions. ;P

My vote would be the tiny167 if we want to ride on whats already been done for the sky9x, but we would probably have an optional disable for the RTC function on it for non-sky9x users (I'd probably try to replace the oscillator instead of connecting the DS3231 along side, though others may want both installed). The arduino is a close second primarily because I'm not sure the extra effort is worth the few extra IOs and after that we end up contending with possible inputs from both the tiny167 and the arduino on the sky9x platform.

Thanks again for hearing me out!

User avatar
ys11
Posts: 40
Joined: Tue May 09, 2017 1:11 pm
Country: -

Re: ERSKY9X Coding

Post by ys11 » Tue May 09, 2017 1:54 pm

Hi, every one I am new to this thread.
And I don't know where to ask about my issue.
If here is not right place, forgive me.

Presently I have some issue when I update a banggood 4in1 module.
My radio is turnigy 9x with ar9x B v1.3 3SD8, firmware ersky r211c8, 4in1 flashed with opti boot loader.
I could flash 4in1 module in ar9x.
After flashed by 1.1.6.21, red LED rapidly flash.
Power off TX, then power on.
Red LED stays on, re-flash succsessfully.
Module works perfectly.

After that I did flash it once more, it ends up failed.
So, I remove the module and connect usbasp to flash opti boot loader again, it can re-flash by 1.1.6.21.

When I flash 4in1 successfully , left lower corner of LCD shows 0000 0000, then change to 1E95 0F10.
Every 2nd attempt, update fails, LCD shows 0000 0000, and not change to 1E95 0F10.

Any solution for this ?
Thank you all.

ys11

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

Re: ERSKY9X Coding

Post by MikeB » Tue May 09, 2017 2:47 pm

How big is the firmware you are trying to flash. It must be less than (32768-512 = 32256) bytes, or it will overwrite the optiboot bootloader.

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

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

Re: ERSKY9X Coding

Post by jhsa » Tue May 09, 2017 5:53 pm

@ys11, be very welcome here :)

Mike, Is it not possible to put a check on the file size, and then only flash it if it is smaller than the bootloader?

Thanks

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: 17187
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB » Tue May 09, 2017 6:06 pm

The bootloader should protect itself, but normally we need the application able to run, which "drops out" to the bootloader when it detects a flash attempt.
@ys11, If flashing doesn't work, try holding the bind button pressed for 2 to 3 seconds while powering on. This should force the bootloader to stay running.

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

User avatar
ys11
Posts: 40
Joined: Tue May 09, 2017 1:11 pm
Country: -

Re: ERSKY9X Coding

Post by ys11 » Tue May 09, 2017 8:47 pm

Thank you Mike B and Joao.
I don't know the file size, but Aruduino 1.6.9 said 96% and 98%.
I'm going to do bind button and report.

ys11

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

Re: ERSKY9X Coding

Post by jhsa » Tue May 09, 2017 9:05 pm

Can you compile the multiprotocol code with a couple less protocols and see if you can then flash the module successfully all the time?

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
ys11
Posts: 40
Joined: Tue May 09, 2017 1:11 pm
Country: -

Re: ERSKY9X Coding

Post by ys11 » Tue May 09, 2017 9:15 pm

Bind button works.
It can flash 96% and 98% one.
I flashed it each other and every time OK.
I didn't bind, but next to Bind shows 1.1.6.21.
Is this timing trouble in boot loader or something ?
Would you please fix it ?
I plan to do module inside of TX.
Thank you Mike B and nice follow up about size of FW Joao.

YS11


Post Reply

Return to “erskyTx (was ersky9x)”