This bean implements access to an internal EEPROM of CPU.
Version specific information for HCS12X derivatives
Note that address parameter "TAddress" (which is used by the bean methods when HCS12X derivative is used) means the global address
from the whole CPU address space.
For example on the MC9S12XDP512 derivative the address of 0x13F000 is pointing to the start of the 4kB EEPROM array.
For more details on the CPU global addressing scheme see the Memory mapping control chapter of the CPU documentation in PDF.
SetByte and GetByte methods are the simplest means enabling to use this bean.
SetWait method denotes, whether the methods used for EEPROM write function should wait till the burn operation is finished or not. Busy method can be used for a detection,
whether EEPROM is ready for the next operation or not.
Interrupt support property denotes, whether it is possible to use an interrupt
request for EEPROM burn operation or whether a polling method should be used. If the interrupt
support is enabled it is possible to generate events OnWriteEnd or OnWritePageEnd;
however, in both cases the support of HW is necessary.
If a PageSize property is set to be greater than zero a virtual page is created.
Methods for buffered access to the EEPROM are available and can be used in such a case.
SetActByte and GetActByte (SetActBytePage
and GetActBytePage) methods do not have a parameter denoting EEPROM (virtual page) address.
An actual value of the EEPROM address register (virtual page pointer) is used instead.
The register (pointer) is before every access (read/write) to the EEPROM pre-incremented.
The register (pointer) can be set up using any method, which has an appropriate
parameter - EEPROM address (virtual page) - for instance the method GetByte (GetBytePage).
Methods for read/write operation to/from EEPROM can return the following error codes:
- ERR_BUSY - device is busy
- ERR_RANGE - operation access memory outside valid bounds
Version specific information for HCS12, HCS12X derivatives
- ERR_BUSY - previous command is not completed
- ERR_VALUE - data verification failed
- ERR_NOTAVAIL - EEPROM Access Error(nonaligned address) or Protection Violation
This bean belongs to the category: CPU Internal Peripherals-Memory