Page 1 of 1

PCAN UDS Address Mapping

Posted: Thu 18. Jun 2020, 15:18
by Shail
Hello,

We are using PCUClient and PCUServer Example code in C++.

Question : In spite of commenting CAN ID Message->DATA.RAW[0] we are able to send request on CAN ID 18DA01FA and 18DAFA01.

(1) What is significance of CAN ID which we are putting in Message->DATA.RAW array?
(2) What is significance of SA and TA ?
(3) is any way we can configure PUDS_ADDRESSING_PHYSICAL and PUDS_ADDRESSING_FUNCTIONAL request with different CAN ID?

PCUClient :
Source : FA Destination : 01
Request CAN ID : 18DA01FA
Response CAN ID : 18DAFA01

// Note: Channel is properly initialized with UDS_Initialize
// Add mapping for physical request from External_Equipment to ECU_X : ID=0x18DA01FA
Message->NETADDRINFO.SA = 0xFA;
Message->NETADDRINFO.TA = 0x01;
Message->NETADDRINFO.TA_TYPE = PUDS_ADDRESSING_PHYSICAL;
Message->NETADDRINFO.RA = 0x00;
Message->NETADDRINFO.PROTOCOL = PUDS_PROTOCOL_ISO_15765_2_29B;
Message->LEN = 8;

// data[0..3] holds CAN ID
Message->DATA.RAW[0] = 0x18;
Message->DATA.RAW[1] = 0xDA;
Message->DATA.RAW[2] = 0xFA;
Message->DATA.RAW[3] = 0x01;
// data[4..7] holds CAN ID Response (for Flow Control) (?1 if none)
Message->DATA.RAW[4] = 0x18;
Message->DATA.RAW[5] = 0xDA;
Message->DATA.RAW[6] = 0x01;
Message->DATA.RAW[7] = 0xFA;

Thanks !

Re: PCAN UDS Address Mapping

Posted: Thu 18. Jun 2020, 15:45
by F.Vergnaud
Hello Shail,

You're mixing a lot of things, before further development you should have a look at the documentation "UDS and ISO-TP Network Addressing Information" §4.3 page 339: It explains the default mapping configuration when you initialize a UDS channel.
Please also check §4.3.2 page 342, to understand when you need to configure mapping and what it means (it will answer your questions regarding Source and Target addresses).

You want to make 29 bit standardized UDS communication because your CAN IDs match the format 0x18DAXXYY, thus you do not need to configure mapping. It is automatically handled by the API.
If you want different CAN IDs, then do not use protocol PUDS_PROTOCOL_ISO_15765_2_29B, but 11B ones (or 29B_NORMAL) and configure mappings as showed in the documentation page 343.

Re: PCAN UDS Address Mapping

Posted: Tue 23. Jun 2020, 12:08
by Shail
Hello,

Thanks for explanation.
Initially we only used to refer 4.3.3 PCAN-UDS Example.

Thanks.