ERSKY9X Coding
- Mechcondrid
- Posts: 222
- Joined: Fri Dec 30, 2011 3:53 am
- Country: -
- Location: ledyard, connecticut, United States
- Contact:
Re: ERSKY9X Coding
well it's dependent on the software of the sd card driver if im remembering right that determines max size
it may be that you already formatted the card as well as it looked like the driver does that for you (not sure as i'm now quite rusty in programming memory space IOs)
it may be that you already formatted the card as well as it looked like the driver does that for you (not sure as i'm now quite rusty in programming memory space IOs)
-
- Posts: 142
- Joined: Tue Dec 27, 2011 5:28 pm
- Country: -
- Location: Kaleden (Twin Lake), British Columbia
Re: ERSKY9X Coding
The card had already been used. I reformatted it to erase the data on the card.
Paul
Paul
- Mechcondrid
- Posts: 222
- Joined: Fri Dec 30, 2011 3:53 am
- Country: -
- Location: ledyard, connecticut, United States
- Contact:
Re: ERSKY9X Coding
used by the board or by a computer?
because what i meant is maybe its looking for a raw (ie. no file system) sdcard?
because what i meant is maybe its looking for a raw (ie. no file system) sdcard?
- MikeB
- 9x Developer
- Posts: 17993
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: ERSKY9X Coding
At this point, the formatting of the card is not significant. I'm just getting the card details. I have been testing with a 2Gb card formatted with FAT16 as it happens. I assume you have made sure the card is fully in the socket. There is a switch that indicates when a card is properly plugged in.
Also, double check the pins of the socket are properly soldered tothe board. One of my sockets wasn't quite down on the board and some of the pins didn't connect.
Mike.
Also, double check the pins of the socket are properly soldered tothe board. One of my sockets wasn't quite down on the board and some of the pins didn't connect.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: ERSKY9X Coding
Having tried open9x under C9x, I have a problem loading latest ersky9x (tried with an older version as well)
Symptoms are Tx switches on, get switch error screen. No buttons work, and Tx won't switch off.
I guess the eeprom wants re-formatting, but I can't see how to do that.
Any help appreciated, thanks!
Clive
Symptoms are Tx switches on, get switch error screen. No buttons work, and Tx won't switch off.
I guess the eeprom wants re-formatting, but I can't see how to do that.
Any help appreciated, thanks!
Clive
- cre8tiveleo
- Posts: 1434
- Joined: Tue Dec 27, 2011 6:13 pm
- Country: -
- Location: Ontario,(GTA North)
- Contact:
ERSKY9X Coding
Thats what happened to me!
I'm not the only one.
It was getting lonely
---
I am here: http://tapatalk.com/map.php?dpfe5b
I'm not the only one.
It was getting lonely
---
I am here: http://tapatalk.com/map.php?dpfe5b
-
- 9x Developer
- Posts: 1109
- Joined: Sat Dec 31, 2011 12:11 am
- Country: -
- Location: Massa (MS), Tuscany, Italy
Re: ERSKY9X Coding
create a new new eeprom in c9x (using ersky9x in preference) and upload it...
- cre8tiveleo
- Posts: 1434
- Joined: Tue Dec 27, 2011 6:13 pm
- Country: -
- Location: Ontario,(GTA North)
- Contact:
ERSKY9X Coding
It's a bit more than that , if it still doesn't work, you'll have to reset the board, easy to do, and you need to use sam-ba to run a script.
---
I am here: http://tapatalk.com/map.php?lhrh25
---
I am here: http://tapatalk.com/map.php?lhrh25
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: ERSKY9X Coding
Mike, am I right in saying that ersky9x doesn't see that the EEPROM is not compatible? I only see this test:
open9x uses EEPROM versions starting from 200. It means that here everything loaded into general settings and into the models is wrong and ersky9x doesn't see anything? Would it be possible that with wrong data loaded from EEPROM the firmware is blocked at the start, before it reaches the USB code?
Bertrand.
Code: Select all
if(g_eeGeneral.myVers<MDVERS)
sysFlags |= sysFLAG_OLD_EEPROM; // if old EEPROM - Raise flag
g_eeGeneral.myVers = MDVERS; // update myvers
Bertrand.
Re: ERSKY9X Coding
Going to get a beer, maybe that will help. Tried all ways.
I get "Cannot convert EEProm fir this firmware original EEProm file will be used" in C9x
I get "Cannot convert EEProm fir this firmware original EEProm file will be used" in C9x
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: ERSKY9X Coding
Did you succeed in reading the EEPROM then? If yes, it's not blocked! Then don't try to convert, begin by writing a blank one! You will use your backup later ...
Bertrand.
Bertrand.
Re: ERSKY9X Coding
No, I can't read the EEPROM from the Tx.
"invalid binary file"
How do I write a blank one? apologies for being thick!
"invalid binary file"
How do I write a blank one? apologies for being thick!
- cre8tiveleo
- Posts: 1434
- Joined: Tue Dec 27, 2011 6:13 pm
- Country: -
- Location: Ontario,(GTA North)
- Contact:
Re: ERSKY9X Coding
Does your tx still lock up at the switch error... then reboot?
Re: ERSKY9X Coding
It doesn't reboot Leo. just sits there with switch error, the controls doing nothing.
Backlight eventally turns off with a bleep, more of a boop actually, then I can't turn
the Tx off. Have to remove battery, fit reset link to try again!
What script do you have to run in samba?
Backlight eventally turns off with a bleep, more of a boop actually, then I can't turn
the Tx off. Have to remove battery, fit reset link to try again!
What script do you have to run in samba?
- cre8tiveleo
- Posts: 1434
- Joined: Tue Dec 27, 2011 6:13 pm
- Country: -
- Location: Ontario,(GTA North)
- Contact:
Re: ERSKY9X Coding
gimme a sec.. looking it up...
tic tic tic...
tic tic tic...
- cre8tiveleo
- Posts: 1434
- Joined: Tue Dec 27, 2011 6:13 pm
- Country: -
- Location: Ontario,(GTA North)
- Contact:
Re: ERSKY9X Coding
6: If you did select the YES button and "LOCKED" the chip. To re-program the chip, you will need to short out the ERASE jumper . and power up the board
by plugging in the USB connection...you now can remove the jumper. The board is returned to its factory default values.
Because you have erased all of the chip , you need to tell the chip what to do at power up. There is a selection BOX labeled "Scripts" , select the "Boot from Flash (GPMVN1)" and click "Execute" . The chip will now run the program loaded in flash memory at power up.
First page of this thread...
viewtopic.php?f=7&t=545&hilit=samba#p6423
by plugging in the USB connection...you now can remove the jumper. The board is returned to its factory default values.
Because you have erased all of the chip , you need to tell the chip what to do at power up. There is a selection BOX labeled "Scripts" , select the "Boot from Flash (GPMVN1)" and click "Execute" . The chip will now run the program loaded in flash memory at power up.
First page of this thread...
viewtopic.php?f=7&t=545&hilit=samba#p6423
Re: ERSKY9X Coding
Thanks Leo, but I've "been there, done that" several times.
It seems to me the eeprom needs formatting, but I don't know how
to do it..Probably something basic I've missed.
P.S.
Apologies, it is rebooting, and goes "boop" when I try to
switch it off.
Clive
It seems to me the eeprom needs formatting, but I don't know how
to do it..Probably something basic I've missed.
P.S.
Apologies, it is rebooting, and goes "boop" when I try to
switch it off.
Clive
Last edited by Clivew on Mon May 14, 2012 10:52 pm, edited 1 time in total.
- MikeB
- 9x Developer
- Posts: 17993
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: ERSKY9X Coding
The switch error screen may be misleading. The way the code works is to display alert messages, then check for the actual error, in a loop. If there is no error, the code returns and goes on to the next thing. The switch check is the last check before the main loop.
It looks to me as though the main menu function in the main loop is failing.
Clive: If you plug the usb cable in, do you get to the USB display?
As Leo asks, is the tx rebooting, and getting back to the switch error screen? There is a watchdog timer that does this if the code doesn't go round the main loop properly.
If you change the switches, does the switch error screen change in any way?
Does the switch error screen indicate any switches in the wrong state?
I assume you tried things like LONG LEFT, and LONG DOWN, and these didn't work?
Several questions I know, but the answers to all of them will help work put what is happening.
I'll change the order of the code to make sure it drops out to the USB.
I have made an effort to make all versions of ersky9x, backward compatible as far as the eeprom is concerned. I haven't considered the eeprom being anything other than blank, or a previous version from ersky9x. This is much the same as er9x. Er9x was written (from th9x) before open9x came along, so it didn't need to consider different eeprom contents might be present.
Curious if the backlight turned off after a time, this suggest something is running.
Mike.
It looks to me as though the main menu function in the main loop is failing.
Clive: If you plug the usb cable in, do you get to the USB display?
As Leo asks, is the tx rebooting, and getting back to the switch error screen? There is a watchdog timer that does this if the code doesn't go round the main loop properly.
If you change the switches, does the switch error screen change in any way?
Does the switch error screen indicate any switches in the wrong state?
I assume you tried things like LONG LEFT, and LONG DOWN, and these didn't work?
Several questions I know, but the answers to all of them will help work put what is happening.
I'll change the order of the code to make sure it drops out to the USB.
I have made an effort to make all versions of ersky9x, backward compatible as far as the eeprom is concerned. I haven't considered the eeprom being anything other than blank, or a previous version from ersky9x. This is much the same as er9x. Er9x was written (from th9x) before open9x came along, so it didn't need to consider different eeprom contents might be present.
Curious if the backlight turned off after a time, this suggest something is running.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
- MikeB
- 9x Developer
- Posts: 17993
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: ERSKY9X Coding
Attached is a 4k binary file (zipped), full of 'erased eeprom data'.
If you run SAM-BA, select the serialflash tab, enable the serialflash to run, then write this file (unzipped) to addresses 0x0000 and 0x1000, it will erase the general setup stored in the eeprom, the models will be unchanged.
Mike.
If you run SAM-BA, select the serialflash tab, enable the serialflash to run, then write this file (unzipped) to addresses 0x0000 and 0x1000, it will erase the general setup stored in the eeprom, the models will be unchanged.
Mike.
- Attachments
-
- EepromBlankBlock.zip
- (158 Bytes) Downloaded 232 times
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
-
- Posts: 142
- Joined: Tue Dec 27, 2011 5:28 pm
- Country: -
- Location: Kaleden (Twin Lake), British Columbia
Re: ERSKY9X Coding
I have checked the connections to the SD card reader and it all looks proper. I resoldered the connections anyway. The sd-card detect connection works properly. With no sd card inserted I get +3.3v at pb7/pin83 of the processor. With the card inserted then pb7/pin83 is at 0v. The description of the revision "There is no user functionality yet, just a status display that tells if you have a card inserted, and gives details read from the card." indicates that I should seem something other than "NOT ready" on the sd card screen if I insert a card.
Paul
Paul
Re: ERSKY9X Coding
Hi Mike,
USB display No (though computer bleeps) after reset that is.
After loading firmware, it switches on OK, get splash screen and the the switch error.
Nothing I do with the switches or buttons changes anything at all, but it is rebooting.
Sorry if I mislead you. If I turn the power switch off, it goes "boop"
and the backlight goes off,but Tx remains powered on.
Clive
USB display No (though computer bleeps) after reset that is.
After loading firmware, it switches on OK, get splash screen and the the switch error.
Nothing I do with the switches or buttons changes anything at all, but it is rebooting.
Sorry if I mislead you. If I turn the power switch off, it goes "boop"
and the backlight goes off,but Tx remains powered on.
Clive
Re: ERSKY9X Coding
Tried that file Mike, it doesn't seem to make any difference.
I hope it's not me being stupid!
I did once get the actual switch shown, throttle as I recall,
but still got the same problem.
Not too worried about the model data, would just like to
get the Tx to work again.
Thanks for your efforts, much appreciated.
I'll try again tomorrow with no beer on board!
Clive
I hope it's not me being stupid!
I did once get the actual switch shown, throttle as I recall,
but still got the same problem.
Not too worried about the model data, would just like to
get the Tx to work again.
Thanks for your efforts, much appreciated.
I'll try again tomorrow with no beer on board!
Clive
- MikeB
- 9x Developer
- Posts: 17993
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: ERSKY9X Coding
PNaz: I'll try adding some more info to see what is happening. I tonly goes from NOT READY to READY if it gets through several steps.
Clivew: If you can write to the serialflash, then try writing the blank block above to the first 34 blocks, addresses 0x0000, 0x1000, 0x2000, . . . 0x9000, 0xA000, . . . 0xF000, 0x10000,
. . . .0x1F000, 0x20000, 0x21000 (hope this makes sense).
It would appear that some tings are working, but the display is not getting updated.
You could also read the serialflash starting at 0x0000, length 0x22000, zip it up and post it here for me to look at.
Mike.
Clivew: If you can write to the serialflash, then try writing the blank block above to the first 34 blocks, addresses 0x0000, 0x1000, 0x2000, . . . 0x9000, 0xA000, . . . 0xF000, 0x10000,
. . . .0x1F000, 0x20000, 0x21000 (hope this makes sense).
It would appear that some tings are working, but the display is not getting updated.
You could also read the serialflash starting at 0x0000, length 0x22000, zip it up and post it here for me to look at.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
- MikeB
- 9x Developer
- Posts: 17993
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: ERSKY9X Coding
I have checks in the file system to try to check it is valid, but, of course, open9x is using the same method and checks, so I don't detect the EEPROM is invalid.
I also realise that, on er9x, if the general data (radio setup) is detected as invalid, then the entire EEPROM is wiped, but on ersky9x, the structure is different, so the models are NOT wiped with the general data. Maybe they should.
Mike.
I also realise that, on er9x, if the general data (radio setup) is detected as invalid, then the entire EEPROM is wiped, but on ersky9x, the structure is different, so the models are NOT wiped with the general data. Maybe they should.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
- MikeB
- 9x Developer
- Posts: 17993
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: ERSKY9X Coding
r65 available, Adds some debug for the SD card, changes the order of things in the main loop (if USB power, never runs the menu system), fixes the bug in disk_read() for the SD card.
PNaz: With this version, there are some numbers displayte after the NOT Ready text. These indicate where the initialisation of the SD card has reached. Also, I'm displaying the three SD card values as they are read, not just when all have been read, they are all set to 0 if no card is detected.
Mike.
PNaz: With this version, there are some numbers displayte after the NOT Ready text. These indicate where the initialisation of the SD card has reached. Also, I'm displaying the three SD card values as they are read, not just when all have been read, they are all set to 0 if no card is detected.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
-
- Posts: 142
- Joined: Tue Dec 27, 2011 5:28 pm
- Country: -
- Location: Kaleden (Twin Lake), British Columbia
Re: ERSKY9X Coding
Just tried r66 and still problems with SD card, however, more info now. I still get NOT Ready but 0000 to the right with no SD card inserted and 0001 with the card inserted. CID CSD and SCR have all 0000 with or without card.
Paul
Paul
- MikeB
- 9x Developer
- Posts: 17993
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: ERSKY9X Coding
That is a failure of the card to respond to the very first command I send to it. I can add some more code to see why it is failing there.
Can you let me know what make the card is, and what size? Also, how old is it, I may be using a more recent spec of the SD card bus, or I may have an old spec, and the card is newer. Or I might not give it enough time to respond.
I might need to find some more technical info about your card and the bus.
So far, I've tried just one card of 2Gb capacity, and it worked. I have another card (4Gb), I'll try that when I get a moment.
Mike.
Can you let me know what make the card is, and what size? Also, how old is it, I may be using a more recent spec of the SD card bus, or I may have an old spec, and the card is newer. Or I might not give it enough time to respond.
I might need to find some more technical info about your card and the bus.
So far, I've tried just one card of 2Gb capacity, and it worked. I have another card (4Gb), I'll try that when I get a moment.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: ERSKY9X Coding
I have a 512Mb and 4Gb SanDisk cards , both show all zeros.
The 512 card is blank , the 4gb has Fat32 .
-Brent
The 512 card is blank , the 4gb has Fat32 .
-Brent
-
- Posts: 142
- Joined: Tue Dec 27, 2011 5:28 pm
- Country: -
- Location: Kaleden (Twin Lake), British Columbia
Re: ERSKY9X Coding
The original SD card I tried was a Lexar 4gb about 2 years old and not a very fast one. I also tried another Lexar 4gb, 2 Sandisk 16Gb, and 1 Sandisk 32Gb with identical results. The 32 Gb is new and the others are several years old.
Paul
Paul
- MikeB
- 9x Developer
- Posts: 17993
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: ERSKY9X Coding
OK, I'll go digging for more info on 'talking' to SD cards, I just tried my 4Gb one, same result as the rest of you, NOT Ready 0001, so I've something to look into.
Mike.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!