DQOM: Switching EEPROM's lower half?
Nick Mueller
Posts: 815
Hi!
Here is my DQOM (dumb question of the month):
What I basically would like to have is a big EEPROM, from what I can switch the lower half (partition) by setting a jumper.
Speaking in three EEPROMs and thus making it clearer:
EEPROM 1a contains code a
EEPROM 1b contains code b
EEPROM 2 contains data
Now, I'd like to select between EEPROM 1a or EEPROM 1b by setting said jumper (no big deal with 3 separate EEPROMs).
But now to the puzzling (at least for me) part: Those EEPROMs from the example above should be one single.
All 3 (or all 3 virtual) EEPROMs should have the same address, so I can boot from either 1a or 1b and access 2 from both boots.
The background is:
code from partition#1a is for configuring the device by storing values into partition#2.
code from partition#1b is for running the device, accessing the configuration data in partition#2 (that was written by code 1a).
Is that doable? Was I understandable?
TIA,
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO
Here is my DQOM (dumb question of the month):
What I basically would like to have is a big EEPROM, from what I can switch the lower half (partition) by setting a jumper.
Speaking in three EEPROMs and thus making it clearer:
EEPROM 1a contains code a
EEPROM 1b contains code b
EEPROM 2 contains data
Now, I'd like to select between EEPROM 1a or EEPROM 1b by setting said jumper (no big deal with 3 separate EEPROMs).
But now to the puzzling (at least for me) part: Those EEPROMs from the example above should be one single.
All 3 (or all 3 virtual) EEPROMs should have the same address, so I can boot from either 1a or 1b and access 2 from both boots.
The background is:
code from partition#1a is for configuring the device by storing values into partition#2.
code from partition#1b is for running the device, accessing the configuration data in partition#2 (that was written by code 1a).
Is that doable? Was I understandable?
TIA,
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO
Comments
You'll have to do that a different way:
EEPROM 1a holds code a
EEPROM 1b holds the data
EEPROM 2 holds code b
Please note that code a and code b have to access the data by using different hardware adresses.
If you really want to use only one EEPROM then you need a software/hardware solution. Propeller boots the 32kB which contains code a, which reads a pin to see if it should continue or maybe load some code from upper part of the EEPROM. Have a look at this thread : http://forums.parallax.com/forums/default.aspx?f=25&m=363100
Whenever I ride the bike to ventilate my fogged brain (I'm a smoker), I get the beast ideas:
EEPROM: 128KByte.
1st 1/4 contains Program a, the one that is normaly running
2nd 1/4 has the setup-program
Rest is for data.
Now program A boots normal, checks for:
a) is jumper set?
b) data in the data-part of EEPROM valid (I'm using my NVVar for that)
If either a) or b) it loads the image from 2nd quarter and boots into it.
Missing information is, how to get that RAM-image running. Hope I understand Mike Greens i2c-routines. They do contain a boot.
That setup could be even used for chaining, if a variabiable from witch address to boot from next is stored somewhere in the EEPROM.
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO
If your program "phases" are shorter than 16K, you could even copy two of them into the 2nd 32K of the EEPROM. The boot routine works like a special purpose data read. As long as the program fits in the EEPROM, it can actually start anywhere and be of any length greater than 16 bytes (for the header). The COPY statement in DongleBasic will only copy programs at 32K boundaries in the EEPROM, but there's no particular reason to require that.
The master himself!
I thought about having shorter images, but not in the first step.
I fear that I'll have to ask you some questions. But I'll try it myself first...
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO