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.

MSPM0G3107: Cannot recover Bus Off error each time

Part Number: MSPM0G3107

Tool/software:

After monitoring Bus Off status, i am trying to reset MCAN module (through DL_MCAN_init), and I understood thanks to forum (TMS320F28P650DK: How the MCAN recovers from a CAN bus off status - C2000 microcontrollers forum - C2000Tm︎ microcontrollers - TI E2E support forums) that i should clear Tx buffer status with DL_MCAN_txBufCancellationReq, could you please provide me some example for using it ? It seems I can recover but not at each Bus Off occurence

  • Please refer to MCAN demo here:

    mcan_application_LP_MSPM0G3507_nortos_ticlang.zip

    Test result:

    This test result is not from this demo, but you can refer to this test result:

    Demo enables CAN bus off status changes interrupt: BO

    And will detect Bus off status register in CAN BO interrupt:

                    DL_MCAN_getProtocolStatus(MCAN0_INST, &gProtStatus);

     

    Then in main loop, CPU will restart CAN when

                    if(CANBusOff == 1)

    and set debug pin to high during the MCAN restart.

     

    Test result:

                    ID from 0x00 to 0x06 is send successfully, total 8 frames.

                    ID from 0x07 to 0x0C is failed to send, due to CANH and CANL is shorted.

                                    Total 5 frames is failed to send and CPU try to restart CAN 6 times.

                                                    You can see busoff pin toggle 6 times, the last one restart CAN successfully.

                                                    void MCAN0_Restart(void)

                    Then after release CANH and CANL’s shorted, CPU run CAN restart successfully.

                    ID from 0x0D to 0x11 are successfully receive by CAN analyzer, total 5 frames.