Information
29.3.1.6 Section Program
The Section Program (SP) command programs up to one section of flash memory that has
previously been erased. A section is defined as the smaller of the flash sector size or half
the size of the FlexRAM. The starting address of the memory to program is sent after the
command word and must be a 64-bit aligned address with the three LSBs being zero).
As data is shifted in, the EzPort buffers the data in FlexRAM before executing an SP
command within the flash. For this reason, the number of bytes to be programmed must
be a multiple of 8 and up to one flash section can be programmed at a time. For more
details, see the Flash Block Guide.
Attempts to program more than one section, across a sector boundary or from an initial
address which does not fall within the valid address range for the flash causes the WEF
flag to set. See Flash memory map for EzPort access.
This command requires the FlexRAM to be configured for traditional RAM operation.
By default, after entering EzPort mode, the FlexRAM is configured for traditional RAM
operation. If the user reconfigures FlexRAM for EEPROM operation, then the user
should use the WRFCCOB command to configure FlexRAM back to traditional RAM
operation before issuing an SP command. See the Flash Memory chapter for details on
how the FlexRAM function is modified.
This command is not accepted if the WEF, WIP, FLEXRAM, or FS field is set or if the
WEN field is not set in the EzPort status register.
29.3.1.7 Sector Erase
The Sector Erase (SE) command erases the contents of one sector of flash memory. The
three byte address sent after the command byte can be any address within the sector to
erase, but must be a 64-bit aligned address (the three LSBs must be zero). Attempts to
erase from an initial address which does not fall within the valid address range (see Flash
memory map for EzPort access) for the flash results in the WEF flag being set.
This command is not accepted if the WEF, WIP or FS field is set or if the WEN field is
not set in the EzPort status register.
Command definition
K20 Sub-Family Reference Manual, Rev. 2, Feb 2012
566 Freescale Semiconductor, Inc.
