Manually restarting CAN after Bus-off condition

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
DaVa_2285651
Level 3
Level 3
10 questions asked First solution authored 10 sign-ins

I have a design which uses the CAN controllers in a PSoC 4200L.  The datasheet for the component says that when the Bus-off restart option is set to Manual, if the bus is turned off, the user/code must restart the CAN.  What exactly needs to be done to restart the CAN component?

I am testing restarting the CAN by enabling Message Transmitted, Message Received, and Bus Off interrupts, then shorting the CAN low and high wires, then sending a message.  I get a bus off interrupt, then try to restart the CAN using the CAN_Enable() API function (CAN_Init() and CAN_StartEx() were called during initialization).  After the bus off interrupt stops firing (after 3-4 calls to CAN_Enable()), I un-short the low and high wires and try to send another message, but I don't see any messages on the bus using a logic analyzer.  Is there something more I need to do other than call CAN_Enable() to restart the CAN?

0 Likes
1 Solution
harshadap_76
Employee
Employee
First like received

Hi David,

You can use CAN_Start() for restarting CAN after bus off.

Can you try it at your end?

Regards

Harshada

View solution in original post

0 Likes
2 Replies
harshadap_76
Employee
Employee
First like received

Hi David,

You can use CAN_Start() for restarting CAN after bus off.

Can you try it at your end?

Regards

Harshada

0 Likes

Hi Harshada,

Thanks for your reply.

I reworked our initialization code to call CAN_Start() (rather than CAN_Init() and CAN_Enable() separately), then call CAN_Start() to reset the CAN component, and I see messages on the bus now.  So, I think the issue is resolved.

0 Likes