General information about UDS Init
This block initializes the Unified Diagnostic Services (UDS) module (ISO-14229) and the underlying CAN transport protocol (ISO-15765) module.
The purposes of the UDS module in the blockset is three-fold: (1) to read and clear error codes, (2) to read/write memory, and (3) remote ECU reset. The first and third parts, error code access and remote ECU reset, are always available. The second part, memory access, can be locked with the block parameter "UDS seed/key required".
If "UDS seed/key required" is set to FALSE (unchecked), the UDS functionality is available through the services:
If "UDS seed/key required" is set to TRUE (checked), the UDS functionality is available through the services:
To access the memory in this latter case, the tester needs to change to session from the default session to ECU extended diagnostic session, using service DiagnosticSessionControl.This session will automatically timeout and revert back to the default session if no diagnostic service request is received within 5 second. The TesterPresent service can be used to keep the ECU extended diagnostic session active.
While the ECU extended diagnostic session is active, the tester needs to unlock the memory access via a seed/key sequence using the SecurityAccess service. Additional UDS blocks need to be added to the Simulink model for giving back a seed to the tester (when requested) and for verifying the key (when received from the tester). Once unlocked, memory access is available through the ReadMemoryByAddress and WriteMemoryByAddress services.
|CAN Channel||CAN channel to use for UDS communication|
|CAN Transmit ID||CAN identifier for sending messages from ECU to tester (or HANtune)|
|CAN Receive ID||CAN identifier for sending messages from tester (or HANtune) to ECU|
|TP Block size||Number of consecutive frames to send/receive in a segmented transfer before a flow control frame is received/sent. When not sure, use a value of 4. Refer to ISO-15765 for more information|
|TP STmin||Minimal separation time between consecutive frames in milliseconds. When not sure, use a value of 40. Refer to ISO-15765 for more information.|
|TP Reception buffer size||Size of the internal buffer in bytes for storing the received data during segmented data transfers. The ISO-15765 specification allows data transfers of up to 4095 bytes, so this would be the optimal size. However, this might not be available on all targets.|
|UDS Transmit buffer size||Size of the internal buffer in bytes for storing transmit data during segmented data transfers. The ISO-15765 specification allows data transfers of up to 4095 bytes, so this would be the optimal size. However, this might not be available on all targets.|
|UDS seed/key required||Certain UDS services can be locked. Enable this checkbox to enable this locking mechanism.|