I'm using PCAN Router FD to recieve CAN FD Msg and send CAN 2.0 Msg
When a message received on CAN2, I added a condition to test if it is a CAN FD msg or not.
this is my main fucntion :
Code: Select all
int main ( void)
{
HW_Init();
// init CAN
CAN_UserInit();
// set green LEDs for CAN1 and CAN2
HW_SetLED ( HW_LED_CAN1, HW_LED_ORANGE);
HW_SetLED ( HW_LED_CAN2, HW_LED_ORANGE);
// main loop
while (1)
{
CANRxMsg_t RxMsgCan2;
// process messages from CAN2 Convert CAN FD -> CAN STANDARD
if (CAN_UserRead (CAN_BUS2, &RxMsgCan2) == CAN_ERR_OK)
{
if (RxMsgCan2.msgtype == CAN_MSGTYPE_FDF) {
readCanFDRecieved(RxMsgCan2);
sendNewMessage();
}
}
}
}
but, when i did a test on stellantis vehicule to validate the soft.
I had an issue, all CAN FD Msg rejected by the soft, the condition "if (RxMsgCan2.msgtype == CAN_MSGTYPE_FDF)" isn't satistfied.
It considere all Msg received ara not CAN FD msg.
I commented the condition and tested the soft again, It works OK. I received all message CAN FD.
Can you tell me how you know if it was an FD msg or not ? because i didn't have acces to the function setting RxMsgCan2.msgtype
Can you help me the resolve the problem please ?
!!!!! : I did an acquisation directly without using PCAN Router FD on vehicule and I have received all the CAN FD Msg OK)