Memory Management prevents Propeller from self-booting
jeff-o
Posts: 181
So here's something strange. It would seem that when I use the Memory Management object, the propeller is no longer able to boot up by itself. Not only that, but any project that contains it seems to erase the entire EEPROM - even data stored in the upper 32k! Note that this is using a custom made board, though the connections to memory (including pull-up resistors) are identical to that of a standard propeller demo board. I did a quick experiment:
1. load a known working program to EEPROM
2. power down the propeller board, and turn on power with the prop plug removed
3. confirm the program boots OK
4. Drop the code to initialize Memory Management into my known working program (don't even bother reading or writing anything)
5. load the new program into EEPROM
6. power down the prop board, turn on with prop plug removed
7. board does NOT boot up
A second experiment involved writing data to upper 32k, permanently loading the "known working" program below, then watching all that data disappear.
I've got no explanation for it. My memory storage location starts at 8020, so it should be free and clear of the lower 32k.
The program below does nothing but blink two LEDs, using routines included with 12blocks. I've included both the 12b file and spin, as well as the memory storage object I've marked up with xml for 12blocks. My project is dead in the water if it can't boot by itself, so any help is much appreciated!
known working.zip
1. load a known working program to EEPROM
2. power down the propeller board, and turn on power with the prop plug removed
3. confirm the program boots OK
4. Drop the code to initialize Memory Management into my known working program (don't even bother reading or writing anything)
5. load the new program into EEPROM
6. power down the prop board, turn on with prop plug removed
7. board does NOT boot up
A second experiment involved writing data to upper 32k, permanently loading the "known working" program below, then watching all that data disappear.
I've got no explanation for it. My memory storage location starts at 8020, so it should be free and clear of the lower 32k.
The program below does nothing but blink two LEDs, using routines included with 12blocks. I've included both the 12b file and spin, as well as the memory storage object I've marked up with xml for 12blocks. My project is dead in the water if it can't boot by itself, so any help is much appreciated!
known working.zip
Comments
Edit: The device is a Microchip 24FC1026
As Mike points out, addressing the lower 64K of a 128K EEPROM should be no different than addressing a 64K EEPROM. Accessing the upper 64K may be manufacturer-dependent.
-Phil
I have another project (The Plant Whisperer) in which I do much the same thing as I am attempting here, and it works fine. That's using a 64K chip from Atmel, and I'm using Memory Storage Lightweight for that one. At this point it would seem that the problem is either the chip itself, or something I accidentally messed up in the memory storage code. I can play around with Lightweight to see if it works better with this chip. If it doesn't, then perhaps this 128K device just isn't compatible with the memory storage object.
I rigged up Memory Storage Lightweight, and my experiences were the same. Loading a program onto the EEPROM still erases all the data stored on it (or at least the table...) and it is not able to boot up on its own. Since the Lightweight object I used here is an exact duplicate of the one I successfully used on the Plant Whisperer, I'm gonna have to say that this 128K EEPROM I used just isn't compatible for some reason. I'll see if I can pop in the 64K device I used on the Plant Whisperer (hmmm, I wonder if I have any left over?)
Thanks! That pretty much confirms to me that it's a hardware problem. I'll order a new 64K EEPROM tonight.
-Phil
The erasing/non-booting problem probably has to do with some incompatibility with the Basic I2C Driver with >64KB EEPROMs. The init and/or reset_all only erases information starting at store_info and before start_data (both values set in the CON).
Heh, serves me right for being greedy and wanting all that storage space. I've got 64K parts on the way, so I will be able to confirm that it is a hardware issue by tomorrow night.
It was indeed the EEPROM. I just installed a new 64K device (AT24C512BN) and it works flawlessly. And there you have it: DO NOT use the Microchip 128K EEPROM with Memory Storage, because it won't work!
Thanks for all your help and patience. Your knowledge and experience is, as always, much appreciated!