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.

TMS320F280039C: MCAN Bus recovery

Part Number: TMS320F280039C

I am using the MCAN module for transmitting and receiving CAN 2.0 A frames. Because of the noise bus, Node is facing stuffing and form errors. I need to implement auto bus recovery, but there is no precise implementation with the driver library. For DCAN ABO bit in CTL reg can enable autobus recovery, How can we do the same for MCAN??

  • Chirag,

    Would be best to address the cause of noisy bus to minimize frame corruption and not solely rely on bus off recovery as this would be a temporary solution.  Bus recovery will happen but throughput of your application with MCAN will be affected if the frame errors are persistent. A good portion of the bus recovery routine will be waiting for consecutive recessive bit durations, which will slow throughput.

    Anyway, a bus off condition in MCAN would automatically set CCCR.INIT which will put the MCAN module in reset state (see note in LEC bit description in register MCAN_PSR).  You can set an interrupt event by enabling BOE in MCAN_IE register and configure the BOL bit in MCAN_ILS.   Once there is an ISR for the bus off event, you can clear CCCR.INIT bit (CCCR.INIT=0) in that interrupt service routine.  During bus off condition, and CCCR.INIT=0, the device will wait for 129*11 consecutive recessive bit duration (similar to DCAN) before the MCAN module resumes operation.

    Regards,

    Joseph