i am using Pass thru API(J2534) & ISO 15765 using CAN communication. Actually i am using this API to flash microcontroller. Below is the code & log i am using to transfer data but the data transfer is slow.it take 3846 byte of size data take 2.4 seconds using PCAN(PEAK-systems).But it should be taking nearly 200ms.
<code>public unsafe struct PASSTHRU_MSG
{
public uint ProtocolID; /* vehicle network protocol */
public uint RxStatus; /* receive message status */
public uint TxFlags; /* transmit message flags */
public uint Timestamp; /* receive message timestamp(in microseconds) */
public uint DataSize; /* byte size of message payload in the Data array */
public uint ExtraDataIndex; /* start of extra data(i.e. CRC, checksum, etc) in Data array */
public fixed byte Data[4128]; /* message payload or data */
};
PASSTHRU_MSG message;
message. ProtocolID = ISO15765_PROTOCOL_ID;
message. DataSize = 6 + 3840;
message. TxFlags = 0x100;
message. Data[0] = 0x1B;
message. Data[1] = 0xDA;
message. Data[2] = 0x17;
message. Data[3] = 0xF1;
message. Data[4] = 0x36;
message. Data[5] = 0x01;
message. Data[5] = 0xff;
""
""
""
message.Data[3846] = 0xff;
PCan.PassThruWriteMsgs(gChannelID, &message, 1 , Timeout1000millisecond);
</code>
<code>public unsafe struct PASSTHRU_MSG
{
public uint ProtocolID; /* vehicle network protocol */
public uint RxStatus; /* receive message status */
public uint TxFlags; /* transmit message flags */
public uint Timestamp; /* receive message timestamp(in microseconds) */
public uint DataSize; /* byte size of message payload in the Data array */
public uint ExtraDataIndex; /* start of extra data(i.e. CRC, checksum, etc) in Data array */
public fixed byte Data[4128]; /* message payload or data */
};
PASSTHRU_MSG message;
message. ProtocolID = ISO15765_PROTOCOL_ID;
message. DataSize = 6 + 3840;
message. TxFlags = 0x100;
message. Data[0] = 0x1B;
message. Data[1] = 0xDA;
message. Data[2] = 0x17;
message. Data[3] = 0xF1;
message. Data[4] = 0x36;
message. Data[5] = 0x01;
message. Data[5] = 0xff;
""
""
""
message.Data[3846] = 0xff;
PCan.PassThruWriteMsgs(gChannelID, &message, 1 , Timeout1000millisecond);
</code>
public unsafe struct PASSTHRU_MSG
{
public uint ProtocolID; /* vehicle network protocol */
public uint RxStatus; /* receive message status */
public uint TxFlags; /* transmit message flags */
public uint Timestamp; /* receive message timestamp(in microseconds) */
public uint DataSize; /* byte size of message payload in the Data array */
public uint ExtraDataIndex; /* start of extra data(i.e. CRC, checksum, etc) in Data array */
public fixed byte Data[4128]; /* message payload or data */
};
PASSTHRU_MSG message;
message. ProtocolID = ISO15765_PROTOCOL_ID;
message. DataSize = 6 + 3840;
message. TxFlags = 0x100;
message. Data[0] = 0x1B;
message. Data[1] = 0xDA;
message. Data[2] = 0x17;
message. Data[3] = 0xF1;
message. Data[4] = 0x36;
message. Data[5] = 0x01;
message. Data[5] = 0xff;
""
""
""
message.Data[3846] = 0xff;
PCan.PassThruWriteMsgs(gChannelID, &message, 1 , Timeout1000millisecond);
New contributor
Deepak panday is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.