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.

TMS320F2800155-Q1: How to restore the CAN bus bus-OFF? What are the specific steps

Part Number: TMS320F2800155-Q1


Tool/software:

Dear Team:

       In my debugging process, I found that the bus always appeared abnormal from time to time, for example, there were no reports reported, so I suspected that the bus was in the OFF state at this time. However, I read many methods and did not get a clear reply, so I hope to get a reply from your official personnel. At present, I short-link CANH and CANL. In this case, CAN will report ERROR, resulting in no data being reported. At present, I have two methods. CAN_setAutoBusOnTime(CANA_BASE,100) this  function to solve, from the phenomenon seems to be solved, another method is to call CAN_enableController(uint32_t base) he solution, Make CanaRegs.CAN_CTL.INIT=0; Seems to be able to restore communications. May I ask what the correct solution is?

       At the same time, I have a puzzle, when my product is loaded on the bus, there will be a lot of data sent and received on the bus, at this time, CAN communication will have no data reported, I would like to ask, is this phenomenon CAN_ERROR? If this happens, is it handled in the same way as bus busoff?

look forward to your reply.

Best Regards

Zhang

  • Hi Zhan,

    Can you please first confirm that the problem is actually bus off issue?  You can do this by checking contents of CAN_ES status register as well as the error counter register CAN_ERRC.  Under normal circumstances, there should not be any events in the CAN bus that lead to bus off.  Correct solution is to address the cause of bus off condition which could be timing tolerances on one node or contact issue on another node, or some other possibilities that disrupts the CAN frames in the bus.

    As long as the auto bus on feature is not disabled, bus off recovery will be carried out automatically by the DCAN module.  Proper way is to set the bus-off recovery time using CAN_setAutoBusOnTime() API.  Rest will be done by the DCAN module itself. 

    Regards,

    Joseph

  • Hi Joseph

     it is not convenient for us to conduct simulation and debugging.I can not determine whether the bus is closed, as we in the vehicle test, the probability of this situation is very low, but his process is always interrupted in the process of communication, that is, my host computer did not receive the data report. At this time, my operation is power off, power on, and then normal again, but I did not configure Autobuson at this time.Therefore, I think the reason for such data not being reported is ERROR. So I would like to ask, in addition to ERROR causing my data not to be reported, may it be caused by those reasons? Since this problem can only be repeated on the vehicle,

    Regards,

    Zhang