I am using Can_Demo.c on VF50 and meet a problem with Flexcan(SOIDMM55/63). Everything is find if application works in expected way that is Can_Init
, Can_SetConfigInt
, Can_Open
, Can_Write
, Can_Close
and Can_Deinit
are called properly. However, application quits by accident and Can_Close
and Can_Deinit
are not called. Can_Demo gets started again, Can_Write
will return zero but the CAN frame does be received by peer. At this time, BusStatus
is zero. CAN reset is implemented inside Can_Init
from this thread. Only power cycle, CAN bus can get recovery.
Yes, thanks.
Hi,
Proper closing of the handle is important before you quit the application , otherwise it may not run properly the next time you start the application (unless you have rebooted the module).However, in this case, the message is getting transferred with error (can write error).
I was able to reproduce the issue and created a ticket for it.
Thanks for pointing it out
Thanks for your investigation. Handle proper closing is recommanded whenever it is possible. In real world, there is an chance that application quits before closing handles. And it is not a good choice to reboot module, relaunching application is preferred.