Block to initialize the Unified Diagnostic Services (UDS) module.
Description
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.
ParametersMake sure that the Simulink model contains a CAN config block for the channel that you want to use UDS on.