Is it possible to use two IntEEPROM beans, simultaneously?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is it possible to use two IntEEPROM beans, simultaneously?

Jump to solution
1,422 Views
AndersJ
Contributor IV

HCS12XEP100, IntEEPROM bean and PE V2.99.

 

I want to use 4096 bytes of emulated EEPROM.

In addition to that I want to use more of the EEPROM

and access it with the SetByte and Get Byte functions.

 

I added two beans and set up the Start adresses and used sizes accordingly,

but PE complains about using the bean twice.

 

Is it not possible to set up more than one IntEEPROM bean?

 

If not, how do I use emulated and NOT emulated EEPROM simultaneously?

 

Thanks,

Anders J

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
1,245 Views
ProcessorExpert
Senior Contributor III

Hello,

 

IntEEPROM component must have only one instance in the project. To use D-Flash and emulated eeprom simultaneously, you have to partition the memory first, see properties „D-Flash sector count“ and  „Buffer RAM sector count for Emulated EEPROM“ Ratio between D-Flash and Emulated eeprom size is selected by these two properties. In the third column of these properties, you can see the range of addresses that are acceptable for SetByte, GetByte methods in corresponding area. You will have to adjust also „Used size“ property according to selected D-Flash size.

 

The partitioning itself is performed either in init code (property „Partition D-Flash in init“ must be set to yes), or by calling „Partition“ method anywhere in the user code.

 

After that you can use GetByte, SetByte and other methods with addresses displayed in „D-Flash sector count“ and  „Buffer RAM sector count for Emulated EEPROM“ properties. The methods will automatically write the value to correct place according to the address passed as the parameter.

 

best regards
Vojtech Filip
Processor Expert Support Team

View solution in original post

0 Kudos
Reply
1 Reply
1,246 Views
ProcessorExpert
Senior Contributor III

Hello,

 

IntEEPROM component must have only one instance in the project. To use D-Flash and emulated eeprom simultaneously, you have to partition the memory first, see properties „D-Flash sector count“ and  „Buffer RAM sector count for Emulated EEPROM“ Ratio between D-Flash and Emulated eeprom size is selected by these two properties. In the third column of these properties, you can see the range of addresses that are acceptable for SetByte, GetByte methods in corresponding area. You will have to adjust also „Used size“ property according to selected D-Flash size.

 

The partitioning itself is performed either in init code (property „Partition D-Flash in init“ must be set to yes), or by calling „Partition“ method anywhere in the user code.

 

After that you can use GetByte, SetByte and other methods with addresses displayed in „D-Flash sector count“ and  „Buffer RAM sector count for Emulated EEPROM“ properties. The methods will automatically write the value to correct place according to the address passed as the parameter.

 

best regards
Vojtech Filip
Processor Expert Support Team

0 Kudos
Reply