1993-2011 General Motors Company, GM Customer Care & Aftersales. All Rights Reserved.
Page
81
3C Op-Code: Read and verify block of memory
Supported By:
Class 2 Interpreter 1
Description:
The 3C Op-Code is used to read data from EEPROM using mode 3C messages. The data that is read is
determined by the information contained in the Action Fields. The requested data can then be compared
against a stored value in VIT2, however at this time only the VIN blocks 01, 02 and 03 are
supported for the
comparison. The success of the function is based on either the comparison (if done), or the success of the
data read request (if the comparison is not done).
The response data is stored in one of the 256-byte internal buffers based on the value of AC3.
Action Fields:
AC0:
Target Device ID
AC1: Block Number being read
01 - Read VIN bytes 1
– 5
02 - Read VIN bytes 6
– 11
03 - Read VIN bytes 12
– 17
AC2:
Exceptions:
01 - Display Immobilizer Pin from data bytes 1 - 4
AC3: ID for storage location of response bytes (0x00
– 0x13)
Pseudo Code:
XX 3C AC0 AC1 AC2 AC3 G0-G1 G2-G3 G4-G5 G6-G7 G8-G9
Build Read Block of Memory message as indicated
in the table below, contents of the XX locations is detailed
in pseudo code
following the table
Request
Byte
Value
Byte Description
1
6C
Format and type
2
AC0
Target
address
3
##
Global source address
4
3C
Read block of memory mode
5
AC1
Block number
6
CS
1 byte message checksum (handled by the system)
Send Mode 3C message
and receive the response
If Block Number is 01
Compare the Response Data bytes 1 through 6 against 0x00 plus VIT2 VIN bytes 1 through 5
Else
If Block Number is 02
Compare the Response Data bytes 1 through 6 against VIT2 VIN bytes 6 through 11
Else
If Block Number is 03
Compare the Response Data bytes 1 through 6 against VIT2 VIN bytes 12 through 17
Endif
Endif
If the Exception Is 01 (AC2=01)
Display the VTD Pin value from response data bytes 1 - 4 (BCD)
Endif
If a Positive response is received and the storage location number (AC3) is valid
Save the data of the response starting with the first Data Byte (after the Block Number in the response) to
the 256-byte storage location indicated by AC3
FYI:
The amount of data (length) stored in the storage location is located in the 7
th
storage buffer
byte (buffer[6]). The reading/writing of data (for Class 2) can never be more than 6 data
bytes. An example of 3 data bytes (0x12, 0x23, 0x34) stored in an internal storage location
would be:
StorageLocation: 0x12, 0x23, 0x34, 0x00, 0x00, 0x00, 0x03, ….
Endif
CameraLoops.com
1993-2011 General Motors Company, GM Customer Care & Aftersales. All Rights Reserved.
Page
82
(continued)
If a VIN block comparison was successful
or
a response was received from a non-VIN block (01, 02, 03)
Set the “response code” to Response Byte 4
Else
If no response
was received
Set the “response code” to “no comm.” („FD‟)
Else
Set the “response code” to “05” (Comparison Failed)
Endif
Endif
Look for “response code” in the goto fields
If
the “response code”
is found
Goto appropriate step
Else
Goto step indicated by „FF‟ goto field
Endif
Do'stlaringiz bilan baham: