1997 Intermediate Version
Semiconductor Group
27
1997-10-01
C163-16F
Operation Control and Error Handling
Command execution is started with the last command of the respective command sequence and is
indicated by the respective state flag (PROG for programming, ERASE for erasing) as well as by the
summarizing BUSY flag. While polling BUSY is sufficient to detect the end of a command execution
it is recommended to check the error flags afterwards so an aborted command can be detected.
The command execution should therefore use the following general structure:
q
Write command sequence to Flash module
q
Ensure correct sequence by checking bit SQER
q
Poll BUSY to determine the command termination
q
Check error flags OPER, VPER, BUER (whatever is appropriate)
q
If error: clear flags via “Clear status” or “Reset” and act upon it (e.g. with a retry operation)
The table below gives examples of software actions to be taken after a specific error has been
detected:
Reset Processing
Upon a CPU reset the Flash module resets its state machine and enters the standard read mode
after the internal voltages have stabilized. The internal voltages need to ramp up (e.g. after power
down) or to ramp down (e.g. after an interrupted programming or erase operation). This power
stabilization phase is completed after maximum 100 s. The reset condition of CPU and Flash
module is lengthened until power has stabilized.
Note: The lengthened reset condition is not reflected via pin RSTIN in bidirectional reset mode.
The reset lengthening is disabled in case of an external start after reset.
Software Reactions to Error Conditions
Detected Error
Fault Condition
Software Reaction
SQER
Sequence Error
Wrong command/sector address,
wrong command code,
illegal command sequence
Check address or code and repeat with
correct values.
OPER
Operation Error
Aborted programming or erase
operation due to SW or WDT reset
Repeat Flash operation.
VPER
Voltage Error
Power supply failure
Compare data. Erase sector, if data is
faulty. Repeat Flash operation.
Note that previous blocks must be
reprogrammed after a sector erase.
BUER
Burst Error
Burst buffer overrun,
burst buffer underload
Repeat load sequence with correct
word count.