This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Team,
My customer found a problem that CAN Bus on time too long and not fixed after clear CAN_CTL Init bit at F28075, I did the test with two F280049 launchpad to reproduce this issue.
for the first F280049 launchpad, send CAN data for each about 100ms in while loop, and the second F280049 will receive the data, just connect CANH and CANL together to enter bus off, then in the software there will have the bus on process:
Below are the waveform when set DAR bit for Automatic Retransmission disabled, we can see that the time between call CAN_sendMessage function and resend data on the bus is 300ms, and this time is not fixed, each time for bus off test may be different.
If did not set DAR bit for Automatic Retransmission disabled, there is no this issue as below waveform showed.
what customer want is that when set DAR bit for Automatic Retransmission disabled, the time for bus on should not be so long, and should be fixed.
Any suggestion for this?
I post the code for Launchpad so that it is easy to reproduce this problem.can_ex3_external_Receive.7zcan_ex3_external_transmit_Send.7z
Strong,
Sorry I don’t understand what the issue is. Are you saying the CAN module is taking too long to recover after a bus-off condition? The shortest time for recovery (after the cause of the bus-off condition is removed) is [129 * 11]bit-times. At 500 kbps, this translates to 2.8 ms.
Hareesh,
Yes, customer did the bus off recovery by clearing Init bit by manual, when set DAR bit for Automatic Retransmission disabled, the recovery time is too long since call CAN_sendMessage function and clear Init bit, sometime the time is over 300ms, and it is not a fixed time.
Could you help reproduce this issue with example posted? just using two launchpad, short the CANH and CANL by manual for a proper time to bus off, and disconnected to remove this cause for bus off. then see the waveform of CANH and GPIO0 to check the recovery time.
Strong,
I need to create this setup and look through your code. Will take a day or two.
Strong,
I don't see this issue. I modified your test case slightly for the following reasons:
I correctly see a delay of 2.8 mS from the time I initiate transmit. I think the problem could be the way you generate bus-off. Shorting CANH & CANL lines manually cannot provide you a controlled way of generating a BO condition because you will be doing it for a few seconds. That is, you have no control over precisely when you enter/exit bus off. I took care of this by providing a 3 second delay after the node enters bus off (enough time for me to remove the short between the CAN bus lines) and initiating only one transmit after bus off recovery. Please let me know if you agree with my analysis.
Hi Hareesh,
Thanks for your support.
Customer did more test based on your code that sent me, they do a slight modification as below and still found an issue.
Enable retransmission frame.
//HWREGH(CANA_BASE + CAN_O_CTL) |= CAN_CTL_DAR;
Send the data 3 times as below showed.
CANMessageSet(CANA_BASE, 1, &sTXCANMessage, MSG_OBJ_TYPE_TX);
(*(unsigned long *)ucTXMsgData)++;
DELAY_US(2000);
CANMessageSet(CANA_BASE, 1, &sTXCANMessage, MSG_OBJ_TYPE_TX);
(*(unsigned long *)ucTXMsgData)++;
DELAY_US(2000);
CANMessageSet(CANA_BASE, 1, &sTXCANMessage, MSG_OBJ_TYPE_TX);
(*(unsigned long *)ucTXMsgData)++;
The is little delay for the retransmission frame, but between retransmission frame and first 3 frames, there will have about 22ms delay as below showed, which is too long for them?
Could you help take a check if this is a issue or just a normal operation?
Strong,
How is the bus-off condition generated? Is it still be shorting the bus manually?
Strong,
We released a new app.report last week. It is capable of generating different types of errors. Let me investigate if we could re-purpose it for this issue.
Hareesh ,
Thanks for your support, Do you have a chance to reproduce this issue?
Strong