I'm working on a project using UDS protocol. I have a problem with the PUDS_PARAM_SEPERATION_TIME parameter. When I use PCAN-View to see CAN frames send by the Peak UDS library during a download sequence, I can see the time between two consecutive frames is inferior to the default value 10 ms.
In this sample (part of a TransfertData request 0x36) coming from PC-View output , the time between two frames is sometime inferior to 0.2 ms. The target cannot handle this gap between two frames, it's too short.33) 32193.6 Rx 07E0 8 22 00 00 00 00 00 00 00
34) 32194.2 Rx 07E0 8 23 00 00 00 00 00 00 00
35) 32194.5 Rx 07E0 8 24 00 00 00 00 00 00 00
36) 32194.7 Rx 07E0 8 25 00 00 00 00 00 00 00
37) 32195.2 Rx 07E0 8 26 00 00 00 00 00 00 00
38) 32195.5 Rx 07E0 8 27 00 00 00 00 00 00 00
39) 32195.7 Rx 07E0 8 28 00 00 00 00 00 00 00
40) 32196.2 Rx 07E0 8 29 00 00 00 00 00 00 00
41) 32196.5 Rx 07E0 8 2A 00 00 00 00 00 00 00
42) 32196.7 Rx 07E0 8 2B 00 00 00 00 00 00 00
43) 32197.2 Rx 07E0 8 2C 00 00 00 00 00 00 00
44) 32197.5 Rx 07E0 8 2D 00 00 00 00 00 00 00
45) 32197.8 Rx 07E0 8 2E 00 00 00 00 00 00 00
46) 32198.2 Rx 07E0 8 2F 00 00 00 00 00 00 00
47) 32198.5 Rx 07E0 8 20 00 00 00 00 00 00 00
Even if I try to increase the PUDS_PARAM_SEPERATION_TIME parameter, I get, more or less, the same result.
For changing this parameter I use the following code :
Code: Select all
TPUDSStatus error = UDS_Initialize( PUDS_USBBUS1, PUDS_BAUD_500K, 0,0,0 );
if( PUDS_ERROR_OK == error)
{
qDebug()<<"Init Ok";
BYTE * pTime = new BYTE[1];
pTime[0] = 0x64;
TPUDSStatus status = UDS_SetValue( PUDS_USBBUS1,PUDS_PARAM_SEPERATION_TIME, pTime, 1 );
if( PUDS_ERROR_OK != status )
{
qDebug()<<"Error for setting time "<<QString("0x%1").arg( QString::number(status,16 ).toUpper() );
}
}
else
{
qDebug()<<"Init Failed";
}
I don't understand why the min time between 2 consecutive frames is not 10 ms (or more when I changed it)
Thank in advance for any information.
Alexis