Changes

no edit summary
Line 5: Line 5:  
== Frame Structure ==
 
== Frame Structure ==
   −
An ALDL frame consists of a message ID, length, an optional number of data bytes (up to 64 bytes), and a 2's compliment checksum. Any multi-byte fields are always big-endian unless otherwise noted. The table below illustrates the structure of an ALDL frame.
+
An ALDL frame consists of a message ID, length, an optional number of data bytes (up to 65 bytes), and a 2's compliment checksum. Any multi-byte fields are always big-endian unless otherwise noted. The table below illustrates the structure of an ALDL frame.
    
{| class="wikitable"
 
{| class="wikitable"
Line 12: Line 12:  
| align="center" | 1 || Message ID || The value <code>0</code> is reserved and is not a valid ALDL message ID
 
| align="center" | 1 || Message ID || The value <code>0</code> is reserved and is not a valid ALDL message ID
 
|-
 
|-
| align="center" | 1 || Length || <code>0x55</code> + ''n'', where ''n'' is the number of data bytes (up to 64)
+
| align="center" | 1 || Length || <code>0x55</code> + ''n'', where ''n'' is the number of data bytes (up to 65)
 
|-
 
|-
 
| align="center" | ''n'' || Data ||
 
| align="center" | ''n'' || Data ||
Line 83: Line 83:  
|-
 
|-
 
| align="center" | <code>10</code> || Clear DTCs
 
| align="center" | <code>10</code> || Clear DTCs
 +
|-
 +
| align="center" | <code>13</code> || Security Seed/Key
 
|}
 
|}
    
=== Mode 0 ===
 
=== Mode 0 ===
   −
ALDL Mode 0, or '''Normal Mode''' reverts the effect of any previous ALDL requests (except requests with lasting effect such as a DTC clear), returning the addressed module to normal operation.
+
ALDL Mode 0, or '''Normal Mode''' reverts the effect of any previous ALDL requests (except requests with lasting effect such as a DTC clear), returning the addressed module to normal operation. The table below illustrates the full structure of a Mode 0 request.
 +
 
 +
{|class="wikitable"
 +
! Length (bytes) !! Field !! Value !! Notes
 +
|-
 +
| align="center" | 1 || ID || align="center" | || ID of the module to return to normal mode
 +
|-
 +
| align="center" | 1 || Length || align="center" | <code>56</code> ||
 +
|-
 +
| align="center" | 1 || Mode || align="center" | <code>00</code> ||
 +
|-
 +
| align="center" | 1 || Checksum || align="center" | ||
 +
|}
    
=== Mode 1 ===
 
=== Mode 1 ===
Line 114: Line 128:  
! Length (bytes) !! Field !! Value !! Notes
 
! Length (bytes) !! Field !! Value !! Notes
 
|-
 
|-
| align="center" | 1 || ID || align="center" | <code>F1</code> ||
+
| align="center" | 1 || ID || align="center" | <code>F7</code> ||
 
|-
 
|-
 
| align="center" | 1 || Length || align="center" | <code>58</code> ||
 
| align="center" | 1 || Length || align="center" | <code>58</code> ||
Line 121: Line 135:  
|-
 
|-
 
| align="center" | 2 || Address || align="center" | ''n'' || 16-bit address in big endian format
 
| align="center" | 2 || Address || align="center" | ''n'' || 16-bit address in big endian format
 +
|-
 +
| align="center" | 1 || Checksum || align="center" | ||
 +
|}
 +
 +
Expected response:
 +
 +
{|class="wikitable"
 +
! Length (bytes) !! Field !! Value !! Notes
 +
|-
 +
| align="center" | 1 || ID || align="center" | <code>F7</code> ||
 +
|-
 +
| align="center" | 1 || Length || align="center" | <code>96</code> ||
 +
|-
 +
| align="center" | 1 || Mode || align="center" | <code>02</code> ||
 +
|-
 +
| align="center" | 64 || Data || align="center" | || Memory contents at the requested address
 +
|-
 +
| align="center" | 1 || Checksum || align="center" | ||
 +
|}
 +
 +
=== Mode 3 ===
 +
 +
Mode 3 requests are used for [https://en.wikipedia.org/wiki/Vectored_I/O scatter-gather] memory operations on the PCM. A Mode 3 request is made with a list of 16-bit memory addresses to be read. The PCM responds with the contents of the requested memory locations. Mode 3 scatter-gather requests are useful for retrieving specific values in memory quickly, without creating the large amount of activity on the bus as Mode 2 block reads. The table below illustrates the full structure of a Mode 3 request.
 +
 +
{|class="wikitable"
 +
! Length (bytes) !! Field !! Value !! Notes
 +
|-
 +
| align="center" | 1 || ID || align="center" | <code>F7</code> ||
 +
|-
 +
| align="center" | 1 || Length || align="center" | <code>55</code> + 1 + 2''n'' ||
 +
|-
 +
| align="center" | 1 || Mode || align="center" | <code>03</code> ||
 +
|-
 +
| align="center" | 2 || ''A''<sub>1</sub> || align="center" | || First address to be read
 +
|-
 +
| align="center" colspan="4" | ...
 +
|-
 +
| align="center" | 2 || ''A''<sub>n</sub> || align="center" | ||
 
|-
 
|-
 
| align="center" | 1 || Checksum || align="center" | ||
 
| align="center" | 1 || Checksum || align="center" | ||
10

edits