MC9S12XEP100/Data Flash

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

MC9S12XEP100/Data Flash

881 Views
rasika
Contributor II

Hello all!!

 

I am using MC9S12XEP100 board. I want to use Data Flash feature to write say 100 bytes and read it back from data flash in PE enabled environment. How to do that?? Please help!!

 

Thanks in advance!!

Labels (1)
0 Kudos
5 Replies

636 Views
trytohelp
NXP Employee
NXP Employee

Hi,

Just see this question.

It seems to be old one.

Is it still open ?

Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

636 Views
rasika
Contributor II

Hello Pascal,

Yes!! It is still open. It will be a great help if you can answer with steps to follow..

0 Kudos

636 Views
trytohelp
NXP Employee
NXP Employee

Hi Rasika,

Processor Expert proposes the following option:

    SetByte - This method writes a given byte to a specified address in EEPROM. The method also sets address pointer for SetActByte and GetActByte methods (applicable only if these methods are enabled). The pointer is set to address passed as the parameter.

    GetByte - This method reads a byte from a specified EEPROM address. The method also sets address pointer for SetActByte and GetActByte methods (applicable only if these methods are enabled). The pointer is set to address passed as the parameter.

    SetWord - This method writes a given word (2 bytes) to the specified address in EEPROM. The method also sets address pointer for SetActByte and GetActByte methods (applicable only if these methods are enabled). The pointer is set to address passed as the parameter + 1.

    GetWord - This method reads a word (2 bytes) from the specified EEPROM address. The method also sets address pointer for SetActByte and GetActByte methods (applicable only if these methods are enabled). The pointer is set to address passed as the parameter + 1.

    SetLong - This method writes a given long word (4 bytes) to the specified address in EEPROM. The method also sets address pointer for SetActByte and GetActByte methods (applicable only if these methods are enabled). The pointer is set to address passed as the parameter + 3.

    GetLong - This method reads a long word (4 bytes) from the specified EEPROM address. The method also sets address pointer for SetActByte and GetActByte methods (applicable only if these methods are enabled). The pointer is set to address passed as the parameter + 3.  

SetLong writes 4 bytes in 1 time.

We don't have other option using the Processor Expert IntEEPROM.


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

636 Views
rasika
Contributor II

Hello Pascal,

Thanks for the information associated with IntEEPROM bean and the mentioned methods.

I will study and give a try with above information. Will let you know once I succeed in it.

Thank you so much for your help.

Regards,

Rasika.

0 Kudos

636 Views
trytohelp
NXP Employee
NXP Employee

Hi Rasika,

Ok.

If you're using Processor Expert (PEx) I think you want to use the IntEEPROM (Internal EEPROM) bean.

If it's not the case let me know.

Some Information associated to the bean:

+++++++++++++++

Version specific information for HCS12X derivatives that supports Emulated EEPROM feature

D-Flash and buffer RAM Memory

Before Emulated EEPROM can be used, D-Flash and Buffer RAM area must be partitioned. Partitions are defined by Emulated EEPROM properties (see help of the properties). Partitioning will not take effect unless Partition method is called or Partition D-flash in init property is set (Partitions can be created only in special mode).

The range of addressess selected in Address range properties is checked when writting to corresponding area. The other memory range is set to maximum available memory, i.e. when Address range targets to D-Flash (D-Flash begins at global address 0x100000) then selected range is checked on all writes to D-Flash, but maximum available buffer RAM range is checked on all writes to buffer RAM (end of Buffer RAM is at global address 0x13FFFF). And vice versa, when Address range targets to Buffer RAM then selected range is checked on all writes to Buffer RAM, but maximum available D-Flash range is checked on all writes to D-Flash. Size of buffer ram for Emulated EEPROM area is defined only by the property "Buffer RAM sector count for Emulated EEPROM (ERPART)".

EraseEeprom method doesn't implement mass erase. Sector erase is used instead. The method erases all available sectors for D-Flash user partition.

The memory type the component is writing to (D-Flash or Emulated EEPROM - buffer RAM) is determined by an Address passed as the parameter of SetXX/GetXX methods. If the address targets to the buffer RAM, simple write to a RAM memory is performed and completed on exit of the write method, i.e. waiting settings selected by SetWait method or Wait enabled in init. property is not used (ignored) and Busy method returns always FALSE. When a write to Buffer RAM (Emulated EEPROM) occurs, interrupts are not used and OnWriteEnd and OnWritePageEnd events are not invoked.

+++++++++++++++

I don't have specific example on my hand.

I need to work on it.


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------