
Page 234
2007-10-15
TMP91FW60
14.4.12Flash Memory Protect Set command
See Table 14-12.
1. The data in the 1st and 2nd bytes is the same as in the case of the RAM Transfer command.
2. From the controller to the device
The data in the 3rd byte is operation command data. The Flash Memory Protect Set command data
(60H) is sent here.
3. From the device to the controller
The data in the 4th byte is the ACK response data to the operation command data in the 3rd byte.
The device first checks to see if the data in the 3rd byte contains any error. If a receive error is
found, the device returns the ACK response data for communications error (bit 3) x8H and waits for
the next operation command data. The upper four bits of the ACK response data are undefined.
(They are the upper four bits of the immediately preceding operation command data.)
Then, if the data in the 3rd byte corresponds to one of the operation command data values given in
Table 14-7, the device echoes back the received data (ACK response for normal reception). In this
case, 60H is echoed back and execution branches to the flash memory protect set processing routine.
After branching to this routine, the data in the password area is checked. For details, see
" 14.4.15Password ". If the data in the 3rd byte does not correspond to any operation command, the device
returns the ACK response data for operation command error (bit 0) x1H and waits for the next oper-
ation command data (3rd byte). The upper four bits of the ACK response data are undefined. (They
are the upper four bits of the immediately preceding operation command data.)
4. From the controller to the device
The data in the 5th to 16th bytes is password data (12 bytes). The data in the 5th byte is verified
against the data at address 02FEF4H in the flash memory and the data in the 6th byte against the data
at address 02FEF5H. In this manner, the received data is verified consecutively against the data at the
specified address in the flash memory. The data in the 16th byte is verified against the data at address
02FEFFH in the flash memory.
5. From the controller to the device
The data in the 17th byte is CHECKSUM data. The CHECKSUM data sent by the controller is the
two's complement of the lower 8-bit value obtained by summing the data in 5th to 16th bytes by
unsigned 8-bit addition (ignoring any overflow). For details on CHECKSUM, see
" 14.4.17 How to6. From the device to the controller
The data in the 18th byte is the ACK response data to the data in the 5th to 17th bytes (ACK
response to the CHECKSUM value).
The device first checks to see whether the data in the 5th to 17th bytes contains any error. If a
receive error is found, the device returns the ACK response data for communications error (bit 3)
68H and waits for the next operation command data (3rd byte). The upper four bits of the ACK
response data are the upper four bits of the immediately preceding operation command data, so the
value of these bits is “6”.
Then, the device checks the CHECKSUM data in the 17th byte. This check is made to see if the
lower 8 bits of the value obtained by summing the data in the 5th to 17th bytes by unsigned 8-bit
addition (ignoring any overflow) is 00H. If the value is not 00H, the device returns the ACK response
data for CHECKSUM error (bit 0) 61H and waits for the next operation command data (3rd byte).
Finally, the device examines the result of password verification. If all the data in the 5th to 16th
bytes is not verified correctly, the device returns the ACK response data for password error (bit 0)
61H and waits for the next operation command data (3rd byte).
If no error is found in the above checks, the device returns the ACK response data for normal
reception 60H.