ISO 9141-2 and ISO 14230-2 INITIALIZATION and DATA TRANSFER

时间:2021-10-29 20:34:02

http://ecad.tu-sofia.bg/et/2005/pdf/Paper097-P_Dzhelekarski1.pdf

ISO 9141-2 and ISO 14230-2 INITIALIZATION and DATA TRANSFER

INITIALIZATION

Prior to any diagnostic communication an initialization must be performed.

This is the process of activating the OBD system for starting communication.

The initialization can be started after an idle-time on the bus.

Two types of initialization can be used:

5-baud and fast initialization.

ISO 9141-2 supports only 5-baud initialization,

whereas ISO 14230-2 supports both types.

5-BAUD (CARB) INITIALIZATION

This initialization starts with sending of 5-baud address byte from the tester (client) to the OBD system (server).

If L-line exists, the address byte must be sent simultaneously on both K & L-lines, otherwise it should be sent only on K-line.

The address byte contains the functional address of the OBD system.

This is implemented in two ways in initSlow() method.

In K&L initialization, both lines are driven by simultaneous setting/clearing of RTS and TxD according to the bit values of the address byte:

this is computed 5-baud init. A system timer for 200 ms (5-baud bit time) is used.

For K-only initialization the port is configured at 5 baud rate; the address byte is sent; 2000 ms pause follows; baud rate is restored to 10,400 baud.

Fig. 3 shows the format of the 5-baud initialization. The server returns baud rate synchronization pattern ($55)

(standard baud rate 10,4 kbit/s, other rate is manufacturer specific). All subsequent communications are using this baud rate.

After sending the pattern, the server sends two keywords (KW) which carry information about the form of the subsequent serial communications.

From these keywords the tester identifies the diagnostic protocol to be used, ISO 14230-2 or ISO 9141-2.

After that the client confirms with sending logical inversion of keyword 2.

Then the server confirms with logical inversion of the address byte.

From this time on the communication link is established and the tester can start to request diagnostic data.

ISO 9141-2 and ISO 14230-2 INITIALIZATION and DATA TRANSFER

FAST INITIALIZATION

The fast initialization begins with wake-up pattern (WuP), transmitted by the tester simultaneously on K and L lines

(if provided L line is used, otherwise transmitted only on K-line) – see Fig. 4.

This is implemented in initFast() method by setting the TxD and RTS , followed by waiting for TiniL time interval and clearing of these signals.

After the time TWuP has elapsed the client sends StartComminication message request.

This message uses functional addressing and contains the target address of the OBD system and the source address of the tester.

The server responds with StartCommunication positive response(s), which contains the keywords.

ISO 9141-2 and ISO 14230-2 INITIALIZATION and DATA TRANSFER

DATA TRANSFER

After the communication link has been established, the tester can send request messages

and receive message response(s) from the ECU(s) of the OBD system (see Fig. 5).

This is referred to as data transfer and is performed by the transfer() method.

The transfer timing is very important and is determined by the periods P1…P4 with specified maximal and minimal allowable values.

The timing is implemented by using system timer for wait function and by using communication read timeouts.

In this way it is possible to group received response bytes into messages, based on separation period P2.

The period P3max has value of 5000 ms. After that time the communication link is automatically terminated by the server.

Therefore, to keep connection alive the tester must send periodically request messages.

ISO 9141-2 and ISO 14230-2 INITIALIZATION and DATA TRANSFER

ISO 9141-2 and ISO 14230-2 INITIALIZATION and DATA TRANSFER