This bean implements access to a CPU internal FLASH memory. The entire FLASH memory must be mapped into the address space of the CPU.
Version specific information for HCS12 and HCS12X derivatives:
The IntFlash bean provides methods to manipulate internal flash memory of HCS12 family. The flash memory consists of one or more independent blocks.
Each block contains a number of sectors - the size of the sector depends on CPU type.
The bean's methods employ 24-bit addressing scheme for the all memory models. For HCS12 derivatives the first byte determines the page number, next two bytes represent the physical address
in the window page of the flash memory. For HCS12X derivatives 24-bit Address method parameter is a global address. SetPage, SetWordFlash ,and GetWordFlash methods require
the address to be word aligned. SetLongFlash and GetLongFlash methods require
the address to be long (four-bytes) aligned.
Some methods operate with entire blocks of the flash memory and therefore require the block number as a parameter. If the CPU flash contains only one block
this parameter is ignored.
If it is necessary to modify the flash memory the actual program is running from (especially if it is the same block - see documentation of the CPU),
then the Wait in RAM property has to be set to "yes" to ensure proper function of the programming/erasing methods.
Waiting till the end of write/erase operation can be disabled (not if Wait in RAM mode is enabled).
If property Write Method is set to "Safe Write", the bean uses a memory buffer to store data temporarily. The buffer is
automatically allocated by the bean in data RAM.
The bean also supports buffered access. The user can specify the size of the VirtualPage. The only supported option
for Virtual page allocation is "By the bean".
SetPage and GetPage methods implement read/write
operations with the Virtual page. Care must be taken when storing the Virtual page, because the page must not be written over the boundary of a flash block.
This bean belongs to the category: CPU Internal Peripherals-Memory