There were some mentions from Dana that debugging starts to fail when the program size reaching the amount of flash. Can you shorten your program to the pure EEProm part and test again?
In PSoC 1 world do not define variables inside main(). They will be allocated as for any simple function (and main() IS a function) on the stack, thus reducing unnecessarily the availlable stack-space.
1 of 1 people found this helpful
I noticed the following -
1) In flashsecurity.txt you have 2 blocks set to "U", but your EEPROM size
is only 64 bytes, so you only need to set the last block to "U".
2) When main() starts the first thing on debug is ICE cube loads program,
so all FLASH (including EEPROM) erased and re-programmed. Then you read
EEPROM and get a bad value because nothing has been written to it. You need
to save in EEPROM, in a word location, a value indicating EEPROM was written
at least once under main() control and test that value. I usually use 0c5555 as
a value to test.
So when porogram starts, first time ever, test value is junk not 0x5555. So you
default the LcdCont value to a default value. Then later main(0 writes 0x5555, and
the LcdCont value into EEPROM, so next time it is read you verify main() wrote
EEPROM, and that LcdCont in EEPROM has a legit value.
Keep in mind each time you recompile, download porogram, and debug, EEPROM
gets erased, and so does LcdCont get erased.
Thank you very much
All was a waste
One "U", word access, length=2
It is very clear, read just after write
that was wrong value (same 0x30)
This tiny chip was almost full
Maybe this is a cause.
I gave up EEPROM on this design.