Other Parts Discussed in Thread: C2000WARE
Tool/software:
How the MCAN recovers from a CAN bus off status
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.
Tool/software:
How the MCAN recovers from a CAN bus off status
Hi Wang,
I don't understand how to verify that the bus-off is recovered and then clear CCCR.INIT?
MCAN_getProtocolStatus(MCANA_DRIVER_BASE,&ProtocolStatus);
If ProtocolStatus.lastErrCode has a value of not 0 or 7 to 7.I think the Bus-off has been recovered.
Is that right?
Hi Jinlong,
When the Init bit (CCCR.INIT) is cleared by your code, the MCAN module will then wait for 129 occurrences of Bus Idle (129 × 11 consecutive recessive bits) before resuming normal operation.
After the bus is recovered, the Bus-Off flag is cleared, and TX error counter is reset too.
The LEC might be 5. Each time when a sequence of 11 recessive bits is monitored, a Bit0 error code is written to the Error and Status Register.
Regarding your FAQ: "Before resetting the CCCR.INIT bit, the application software needs to clear all the pending messages and CAN TX status" - where do I find this requirement in the TMS320F28P55x datasheet?
And where do I find the function CanCancelPendingMsg()? It does not seem to be included in C2000Ware 5.x.
where do I find the function CanCancelPendingMsg()? It does not seem to be included in C2000Ware 5.x.
Just noticed that the MCAN driver in C2xWare doesn't have this function. You can write "1" to corresponding bit of TXBCR register to cancel the pending TX buffer.