Erich Nast

How to get the EEPROM in the memory map on 9s12XEQ384

Discussion created by Erich Nast on Jul 22, 2016
Latest reply on Jul 22, 2016 by Radek Sestak

I am using all of the DFLASH on this part; 32768 bytes.

I am using all of the EEPROM on this part; 4096 bytes.

 

After I have used debugger to load the program I can see both the DFLASH at 0x10_0000 and the EEPROM at 0x13_f000.  The program runs, I can write to both these memories and I can read from both memories.  So I am feeling successful.

 

But if I power the unit down, and turn on the power again then the EEPROM is no longer in the memory map. The unit runs, but the EEPROM now has different values in it.

 

I have tried to set MMCCTL1 = EEEIFRON; and it does not help me.

 

I have used the FTM to read EEPROM Emulation Query and it gives me DFPART = 0xffff and ERPART = 0xffff.

I then set the DFLASH for Full Partition DFLASH as it appears not to be setup.  This gives me an ACCERR error in FSTAT.

 

I clear the FSTAT error.

Then I Enable the EEPROM emulation using the FTM and it gives me an error.

I clear this FSTAT error and do the EEPROM Emulation Query and it gives me DFPART = 128 and ERPART = 16 which is correct.

 

But the EEPROM memory is not visible at 0x13_f000.  There is RAM here as I can change this memory address range by editing it with the debugger.

 

I hope all of this makes sense!  I am sure I have something missing, but I cannot guess where.

Outcomes