Hi , I have a problem when use can bus of Lpc1768. When the can bus run into Bus-Off state,I try to restart it. According to the LPC17xx User Manual, Below is my restart code:
LPC_CAN1->MOD = 1; // Enter Reset Mode
LPC_CAN1->GSR = 0; // Clear the Tx error counter
LPC_CAN1->CMR = (1<<1)|(1<<2)|(1<<3);// reset cmr
LPC_CAN1->MOD = 0;// Return Normal operating
But ,after 128 Bus Free condition (11 consecutive recessive bits),the bus still off.
How could I handled the Bus-Off error?
Thanks a lot.