XC2200 Derivatives
System Units (Vol. 1 of 2)
Memory Organization
User’s Manual
3-49
V2.1, 2008-08
MemoryX2K, V1.3
3.9.9
Interrupt Generation
Long lasting processes (these are mainly: program page, erase page, erase sector and
margin changes) set the IMB_FSR.BUSY flag of one flash module when accepting the
request and reset this flag after finishing the process. Software is required to poll the
busy flag in order to determine the end of the operation. In order to release the software
from this burden an interrupt can be generated. If the interrupt is enabled by
IMB_INTCTRL.IEN then all transitions from 1 to 0 of one of the 3 IMB_FSR.BUSY flags
send an interrupt request.
The “
” command sets BUSY only for around 100 clock cycles. It is
usually not advisable to enable the interrupt for this command.
The register
contains fields for the interrupt status “ISR”, an enable for the
interrupt request “IEN” and fields for clearing the status flag “ICLR” or setting if “ISET”. It
should be noted that the interrupt request is only sent when ISR becomes 1 and IEN was
already 1. No interrupt is sent when IEN becomes 1 when ISR was already 1 or both are
set to 1 at the same time.
3.9.10
Recommendations for Optimized Flash Usage
This section describes best practices for using the flash in certain application scenarios,
e.g. how to use effectively ECC and margin reads. For a description of the hardware
features consult
.
3.9.10.1 Programming Code and Constant Data
Code and constant data are programmed only few times during life-time of a device, e.g.
end-of-line in ECU production or when service updates are performed. As the readability
of this data is decisive for the product quality customers might want to implement the
elaborate “best practice” advice.
Basic Advice
Always ensure correct operating conditions and prevent power failures during flash
operation.
As basic protection against handling errors all data should be verified after programming.
Single-bit ECC errors should be ignored. The appearance of small numbers of single-bit
errors is a consequence of known physical effects.
Best Practice
This approach offers best possible quality but risks that programming steps need to
repeated even unnecessarily (“false negatives”):
•
Use “Erase Sector” to erase complete sectors.