I have a severe problem with the PEAK CAN dongle and Visual Studio C++. At random occasions the dongle reads the last sent message instead of the actually received one.
To clarify:
1) I send a message request with
Code: Select all
st_Result = p_PCANBasic->Write(h_Channel, &st_CAN_Msg);
Code: Select all
st_Result = p_PCANBasic->Read(h_Channel, p_Msg, &st_TimeStamp) & ~PCAN_ERROR_IGNORE_MASK;
Mostly the answer is received as normal. But sometimes the answer is not received. Instead the message that was last sent is given back by the p_PCANBasic->Read. There are only the master and slave on the bus. In a trace of the communication I can see that the messages on the bus are correct. Still the message received is not correct.
What could be the reason here??? There must be a bug in the PCAN BASIC driver. Am very thankfull for any hint as this problem is currently delaying production. If it can not be fixed I will have to eliminate the PEAK dongles and make an own solution what would cost more time.