ERSKY9X Coding

erskyTx runs on many radios and upgrade boards
ersky9x was a port of er9x for use on the sky9x board.
ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

Mike,
You should now have access rights to upload a file to one of my Dropbox folders - a link has been emailed to you from Dropbox. You can use that until the issue with openrcforums has been resolved, if you wish - it might be easier and more reliable than email attachments.
regards,
ozphoenix
Last edited by ozphoenix on Fri Mar 08, 2019 1:19 am, edited 1 time in total.

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

Re: ERSKY9X Coding

Post by MikeB »

OK, that's useful. It has pinpointed a loop that doesn't have a timeout, which is why the watchdog occurs. Now to work out why the loop is not terminating. It is related to painting the background of the status line at the bottom of the screen, suggesting something has gone wrong with accessing the display. The processor has special hardware that fills an area of the display, and should generate an interrupt when it has finished, but this isn't happening.
It seems something to do with clearing the display, ready for updating with the new image, is going wrong.
I'll work through possibilities tomorrow.

João: That will be two e-mails he has got then!

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 »

Ok, great! A big step forward :)

Looking forward to catching up with you tomorrow.

Regards,
ozphoenix.
MikeB wrote: Fri Mar 08, 2019 1:11 am OK, that's useful. It has pinpointed a loop that doesn't have a timeout, which is why the watchdog occurs. Now to work out why the loop is not terminating. It is related to painting the background of the status line at the bottom of the screen, suggesting something has gone wrong with accessing the display. The processor has special hardware that fills an area of the display, and should generate an interrupt when it has finished, but this isn't happening.
It seems something to do with clearing the display, ready for updating with the new image, is going wrong.
I'll work through possibilities tomorrow.

João: That will be two e-mails he has got then!

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

Re: ERSKY9X Coding

Post by jhsa »

MikeB wrote: Fri Mar 08, 2019 1:11 am

João: That will be two e-mails he has got then!

Mike
Of course, or more :) There are more moderators on the forums, and we should report problems when we see them.
Last night the forum was offline due to maintenance, as far as I understood. Perhaps that's the reason we can't upload files at the moment..

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

Re: ERSKY9X Coding

Post by MikeB »

Rob has fixed the problem with posting test versions, so I've now posted a new one.
This has timeouts in two places where it was waiting for the hardware to finish filling an area of the screen. If I now get a timeout on those it resets the hardware, adds one to an error count, and now continues execution.
The error count is the single number on the 5th line of the debug menu.
This may not stop the problem from happening, but may recover from it.
I have a 32Gb SD card on order.

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 »

Hi Mike,
Good to be able to work with the normal mechanisms again :)

Got the new version - also still get the restart/blank screen when scrolling (not sure if that was meant to happen):
BOOT REASON WATCHDOG
01E2 020B 01EF
8103 0002 0204
2400 0000 0

DEBUG
0001 0000
0000 (yes, this is the 5th line)

2000 1FF0 0000 0000 0000 0000 0001 0001
0000 0000 0000 3BEF 0802 CD53 0802 CD52
6100 0200 0802 CCD7 0000 0000 0000 00E0
0000 0000 0000 0000 0000 0000 0000 0102

regards,
ozphoenix
MikeB wrote: Fri Mar 08, 2019 12:43 pm Rob has fixed the problem with posting test versions, so I've now posted a new one.
This has timeouts in two places where it was waiting for the hardware to finish filling an area of the screen. If I now get a timeout on those it resets the hardware, adds one to an error count, and now continues execution.
The error count is the single number on the 5th line of the debug menu.
This may not stop the problem from happening, but may recover from it.
I have a 32Gb SD card on order.

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

Re: ERSKY9X Coding

Post by MikeB »

Some more timeouts on the display hardware added, new test version posted. It seems something is causing this hadrware to fail to complete. Let's see if adding these timeouts gets it working, then I can look to find what is happening.

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 »

Hi Mike,
Thanks for persisting late at night (for you).

from you 2309 version:
WATCHDOG
01E2 020B 01EF
8103 0002 0204
2400 0000 0
(Do you need the data from this page now?)

DEBUG
0001 0000
0000 (yes, zero)

2000 1FF0 0000 0000 0000 0000 0001 0001
0000 0000 0000 3BEF 0802 CD53 0802 CD4C
6100 0200 0802 CCD7 0000 0000 0000 00E0
0000 0000 0000 0000 0000 0000 0000 0102

regards,
ozphoenix
MikeB wrote: Fri Mar 08, 2019 11:10 pm Some more timeouts on the display hardware added, new test version posted. It seems something is causing this hadrware to fail to complete. Let's see if adding these timeouts gets it working, then I can look to find what is happening.

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

Re: ERSKY9X Coding

Post by MikeB »

New test version posted. The error count on the 5th line (you say yes zero) wasn't being preserved through the watchdog restart. I was talking this problem through with my wife and realised this.
There is now a second number on the line that is the preserved value.

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 »

Hi Mike,
Ok, thanks - understood.
This time, the screen went to a bright orange colour (not grey) during the first time I got a restart(!), but then grey on the retry (not sure if this is relevant, but point it out, anyway)
BOOT REASON WATCHDOG
01E2 020B 01EF
8103 0002 0204
2400 0000 0

DEBUG
0001 0000
0000 0000 (yes, again, this is the 5th line)

2000 1FF0 0000 0000 0000 0000 0001 0001
0000 0000 0000 3BEF 0802 CD53 0802 CD4C
6100 0200 0802 CCD7 0000 0000 0000 00E0
0000 0000 0000 0000 0000 0000 0000 0102

All details and reports verified with a second time.

Maybe not what you were hoping for, but even that might be forward progress :)

regards,
ozphoenix
MikeB wrote: Sat Mar 09, 2019 12:40 am New test version posted. The error count on the 5th line (you say yes zero) wasn't being preserved through the watchdog restart. I was talking this problem through with my wife and realised this.
There is now a second number on the line that is the preserved value.

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

Re: ERSKY9X Coding

Post by MikeB »

As I still can't work out what is happening, I've added a "execution trace", test version posted. Various parts of the code store the fact they have executed, so it gives me the sequence of execution. I'm storing the last 4000 entries, and writing them to the SD card when a watchdog reboot occurs. They are stored in a file called "pos.txt" in the root of the card.
Please try this test version and post the pos.txt file (zipped) for me to inspect. This should either give me a good idea where to look, or where to add more reporting.

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 »

Thanks, Mike.
Attached.
WATCHDOG
01E2 01B7 01F)
8103 0002 0303
2400 0000 0

DEBUG
0001 0000
0000 0000 0XXX 0000 0fa0 0000 (where XXX is rapidly incrementing hex number from 000 to FFF and screen brightness changes from brightest to slightly dimmed as the number increments)

2000 1ff0 0000 0000 0000 0000 0001 0001
0000 0000 0000 3bef 0802 cd53 0802 cd4c
6100 0200 0802 ccd7 0000 0000 0000 00e0
0000 0000 0000 0000 0000 0000 0000 0102

Sunday morning and perfect flying weather forecast - leaving now to give it a go - will be able to answer questions by smartphone, but not test nor post results, for about 6 hours :) sorry, flying must go on (QX7) :)

regards,
ozphoenix

MikeB wrote: Sat Mar 09, 2019 6:58 pm As I still can't work out what is happening, I've added a "execution trace", test version posted. Various parts of the code store the fact they have executed, so it gives me the sequence of execution. I'm storing the last 4000 entries, and writing them to the SD card when a watchdog reboot occurs. They are stored in a file called "pos.txt" in the root of the card.
Please try this test version and post the pos.txt file (zipped) for me to inspect. This should either give me a good idea where to look, or where to add more reporting.

Mike
Attachments
pos.zip
(351 Bytes) Downloaded 221 times
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

Nothing obviously wrong there, I've added some more tracing that might help! New test version posted.

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 »

Result attached.
MikeB wrote: Sat Mar 09, 2019 8:39 pm Nothing obviously wrong there, I've added some more tracing that might help! New test version posted.

Mike
Attachments
pos.zip
(498 Bytes) Downloaded 209 times
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

Could you try this version a couple more times to see if it stops in the same place please.
Sorry this is taking a long time to find.

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 »

No prob - see attached - 3 tries, in one zip file.
pos1 and pos2 were 'normal' crashes (flash to black, show grey screen, restart)
pos3 went to 'snow lines'-corrupted display first, then continued to 'normal' crash/restart after about 1-2 seconds
regards,
ozphoenix
MikeB wrote: Sun Mar 10, 2019 9:58 am Could you try this version a couple more times to see if it stops in the same place please.
Sorry this is taking a long time to find.

Mike
Attachments
Three tests.zip
(1.41 KiB) Downloaded 202 times
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

All stopping in the same place, just about to update the status line.
How "grey" is the grey screen, is it the same "grey" as the status line background?

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 »

No -- both my wife's eyes and mine believe that the 'grey' of the 'flash once' screen is more 'blue' (like my selected background colour -- red:0, Green:15, Blue: 30) than the steady grey of the status line - if you can guess what we mean. BTW - and, only as a reminder - sometimes the screen that 'flashes' during the 3-4 seconds of the restart is orange, not blue/grey - not sure if that's relevant.

regards,
ozphoenix
MikeB wrote: Sun Mar 10, 2019 11:34 am All stopping in the same place, just about to update the status line.
How "grey" is the grey screen, is it the same "grey" as the status line background?

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

Re: ERSKY9X Coding

Post by MikeB »

New test version with some more tracing added, and the stack dumped to the pos.txt file as well.
I feel we are (slowly) homing in on the problem.

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 »

Hi Mike,
Three consecutive fails enclosed and attached - each one similar - flashed to blue/grey screen and restart, during scrolling.
Regards,
ozphoenix

MikeB wrote: Sun Mar 10, 2019 12:31 pm New test version with some more tracing added, and the stack dumped to the pos.txt file as well.
I feel we are (slowly) homing in on the problem.

Mike
Attachments
x12d_rom_10032019-1232.zip
(2.28 KiB) Downloaded 138 times
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

I found a bug where I only waited for the background to clear every other "pass". If the menu operation took too long (lots of SD card reads!), then I could try to use the hardware before it finished. This may be the problem. Normally the background clearing finishes anyway, and the code doesn't need to wait, but when scrolling a long list of files, I can see a wait being needed, and this could be missed. It seems my radio/SD card is just fast enough not to fall over this.

New test version posted with the fix in.

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 »

Hi Mike!

That sounds hopeful - if that is the case, I'm glad you could find it before a lot of X12S move on to Ersky9x.

I'm away from my house for about an hour - I'll try the new version as soon as I return and report. Does the new version have any remaining debug code in it that will report anything - do you need a 'dump' returned to you, whether or not I get a failure?

Regards,
Peter M.
MikeB wrote: Sun Mar 10, 2019 11:08 pm I found a bug where I only waited for the background to clear every other "pass". If the menu operation took too long (lots of SD card reads!), then I could try to use the hardware before it finished. This may be the problem. Normally the background clearing finishes anyway, and the code doesn't need to wait, but when scrolling a long list of files, I can see a wait being needed, and this could be missed. It seems my radio/SD card is just fast enough not to fall over this.

New test version posted with the fix in.

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

Re: ERSKY9X Coding

Post by MikeB »

Yes, all the debug code is still in. You only get a dump (pos.txt) if you get a failure, although you may cause a watchdog reboot by pressing the T6 switch down, which is how I was checking the dump works.
I only really need a dump if you get a failure.

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 »

BINGO!

I do believe you have solved it :)

Unable to cause a restart, though scrolled for about two minutes - the longest time prior seemed to be about 30 seconds or less.

And, so far, no occurrence of screen 'snow lines' - not sure if it was related, but that one only appeared infrequently and not on every restart - will hopefully not see that appear again, either. I will, obviously, report back if either issue shows it's head again, but hopefully not.

Congratulations, Mike - thanks for the persistence and effort.

I'll leave it for you to decide when to post a version with the debug code taken out - I have still a number of things I want to do with the X12S before I formally 'use' it, so no hurry yet.

Also, I'd like to discuss moving to the next steps in the UI, if I may, when you're ready to take input on this one. I know that this restart issue has been bogging you down a bit, so let me know when you are recovered enough for separate matters.

Regards,
ozphoenix
MikeB wrote: Sun Mar 10, 2019 11:19 pm Yes, all the debug code is still in. You only get a dump (pos.txt) if you get a failure, although you may cause a watchdog reboot by pressing the T6 switch down, which is how I was checking the dump works.
I only really need a dump if you get a failure.

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

Re: ERSKY9X Coding

Post by MikeB »

:D
I have no idea why I had code in that only waited for the background to clear every other pass, look like it was something to do with timing how long the clear took.
I'll post a version without the debug tomorrow. Most of it is already removed as it was conditionally compiled so just needed turning off.
Please do make suggestions for the UI, I can look into them.

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 »

:D
It was what it was and now it is not -- no harm done, all good -- we can move on now -- AFTER you go get some sleep :D

regards,
ozphoenix
MikeB wrote: Mon Mar 11, 2019 12:51 am :D
I have no idea why I had code in that only waited for the background to clear every other pass, look like it was something to do with timing how long the clear took.
I'll post a version without the debug tomorrow. Most of it is already removed as it was conditionally compiled so just needed turning off.
Please do make suggestions for the UI, I can look into them.

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

Re: ERSKY9X Coding

Post by jhsa »

Well done Gentlemen. ;) :mrgreen:

You nearly made me feel like getting an Horus.. But I remembered that my 9x radios, in different electronic flavors, do all I need :) Ersky9x Rockzzz.... :D

Thanks Mike..

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

Re: ERSKY9X Coding

Post by MikeB »

Just posted a fixed test version with the debug removed.
Now I need to charge my Tx again!

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 »

Hi Mike,
Ok, thanks - will get it and install it and move on :)
Have had to be continually charging mine during the recent testing - so much so that I ordered the LiPo upgrade kit, but it will not even ship from China until sometime after March 30th, I believe :(
Once again, thanks for your sterling efforts in resolving this most recent problem - it sure was a doozy!
Will come back to you in the coming days with UI discussion points - looking into it further now.
Regards,
ozphoenix
MikeB wrote: Mon Mar 11, 2019 10:08 am Just posted a fixed test version with the debug removed.
Now I need to charge my Tx again!

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

Re: ERSKY9X Coding

Post by ozphoenix »

Installed - scrolling constantly for 60 seconds produced no errors :)
We can now move on :)
ozphoenix wrote: Mon Mar 11, 2019 11:04 am Hi Mike,
Ok, thanks - will get it and install it and move on :)
Have had to be continually charging mine during the recent testing - so much so that I ordered the LiPo upgrade kit, but it will not even ship from China until sometime after March 30th, I believe :(
Once again, thanks for your sterling efforts in resolving this most recent problem - it sure was a doozy!
Will come back to you in the coming days with UI discussion points - looking into it further now.
Regards,
ozphoenix
MikeB wrote: Mon Mar 11, 2019 10:08 am Just posted a fixed test version with the debug removed.
Now I need to charge my Tx again!

Mike

Post Reply

Return to “erskyTx (was ersky9x)”