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.

TMS570LC4357: Failed to set DCAN's INIT bit at passive error state.

Part Number: TMS570LC4357

When DCAN in passive error state, tries to set DCAN's INIT bit to 1 and software reset DCAN. Occasionally, setting DCAN's INIT bit takes a long time which is more than 10 ms before INIT bit is acked.

Does anyone encounter this issue before? What's the approach to fix it?

Also, what's the better way to bring DCAN out of passive error state? How to clear RX errors?

- Thanks

  • Hi Mike,

    It should not take that long. My test on LS04x device shows that it only takes 93 CPU clock cycles (CPU is 80MHz). 

    The following is my test code. The CAN1 keeps transmitting message to CAN bus, since no ACK, the error increments to 0x80 (passive). When EPass bit is set, the PMU counter starts counting, and Write 1 to Init bit. The PMU stops counting after Init bit gets set:

    while(1)
    {
          canTransmit(canREG1, canMESSAGE_BOX1, &tx_data[0]);

          if((canREG1->ES & 0x20) == 0x20){

       _pmuResetCounters_();
       _pmuStartCounters_(pmuCYCLE_COUNTER);
       canREG1->CTL |= 0x01;

       while((canREG1->CTL & 0x01) != 0x01);

       _pmuStopCounters_(pmuCYCLE_COUNTER);

       /* Get CPU cycle count */

       pmuCount =_pmuGetCycleCount_();

    }

    }

  • Hi QJ,

    Setting INIT bit doesn't always take more than 10ms. Usually only happen once after running CanClose() and CanOpen() for a couple of hours. We use CanClose() and CanOpen() to bring CAN out of passive error mode.

    BTW, is there any recommended method to let CAN out of passive error mode?

    - Thanks 

  • Hello Mike,

    The error count decreases by 1 when correctly transmitted and/or received a message. You need to figure out where the errors are from: ACK error, bit error, stuff error.