M58LT128HST, M58LT128HSB
Flowcharts and pseudo codes
Figure 25. Protect/Unprotect operation flowchart and pseudo code
Start
protect_operation_command (address, protect_operation) {
Write 60h (1)
writeToFlash (address, 0x60) ; /*configuration setup*/
/* see note (1) */
if (protect_operation==PROTECT) /*to protect the block*/
writeToFlash (address, 0x01) ;
else if (protect_operation==UNPROTECT) /*to unprotect the block*/
writeToFlash (address, 0xD0) ;
Write
01h, D0h
writeToFlash (address, 0x90) ;
/*see note (1) */
Write 90h (1)
Read Block
Protect State
if (readFlash (address) ! = protection_state_expected)
error_handler () ;
NO
Protection
change
/*Check the protection state (see Read Block Signature table )*/
confirmed?
YES
writeToFlash (address, 0xFF) ; /*Reset to Read Array mode*/
/*see note (1) */
Write FFh (1)
}
End
AI12895
1. Any address within the bank can equally be used.
97/110