2006-06-12 09:08 AM
EEPROM EMULATOR on STR71x family CPU
2006-06-10 03:46 AM
I am having a problem trying to use internal flash (bank1)as EEPROM of STR71x family microprocessor. Using a HITEX eval board (purchased from Keil) and I copied code which I downloaded directly from ST website --- the result was, system hung immediately when I ran it. Could some STR71 expert(s) in this forum kindly take a look at the code below and then please tell me what I did wrong here?
volatile unsigned long Data_Read; volatile unsigned long Write_Status; volatile unsigned long Read_Status; int main (void) { EEPROM_Init(); //initialize EEPROM // ------------ dataset#1 ------------ Write_Status = EEPROM_DataWrite(0x11111111); ///<< system hung begins if (Write_Status == EEPROM_SUCCESSFUL_DATA_WRITE) { Read_Status = EEPROM_DataRead(&Data_Read); if (Read_Status == EEPROM_SUCCESSFUL_DATA_READ) printf(''The Valid Data-set is %x\n'',Data_Read); } // ------------dataset#2 ------------ Write_Status = EEPROM_DataWrite(0x22222222); if (Write_Status == EEPROM_SUCCESSFUL_DATA_WRITE) { Read_Status = EEPROM_DataRead(&Data_Read); if (Read_Status == EEPROM_SUCCESSFUL_DATA_READ) printf(''The Valid Data-set is %x\n'',Data_Read); } // ------------ dataset#3 ------------ Write_Status = EEPROM_DataWrite(0x33333333); if (Write_Status == EEPROM_SUCCESSFUL_DATA_WRITE) { Read_Status = EEPROM_DataRead(&Data_Read); if (Read_Status == EEPROM_SUCCESSFUL_DATA_READ) printf(''The Valid Data-set is %x\n'',Data_Read); } } //end main()2006-06-12 05:10 AM
Thanks for the reply. I am very new to the ARM
enviroment. Looking into the reference manual you suggested, I still can figure out exactly where should the code be modified to execute from RAM. Could you please kindly modify my quote per your suggestion? Thanks for your help in advance, Regards, JIMMY2006-06-12 09:08 AM
Hi Sir,
I read the Note on section 2.3 but I am still not be able to implement into my code above. Do you have a ''known'' working code so that I can try out on my eval board? to see if your theory is really work? I am using KEIL UV3 compiler (REALVIEW). My e-mail is:mailto:jsayavong@perkinselectronics.com
if you don't mind sharing your code. Regards, JIMMY