Hi, I’m working on a CAN application over the VF61. I’m developing a C/C++ app to send and receive frames but I realized that I can´t receive frames where DLC is less than 8. Moreover, if I don´t fill the dataLen of the tCanMsg structure before the call of “VybCan_Read” the app seems to crash. It is as if the library doesn´t initialize that structure.
I’m using
TdxCommon.h version 1.7
can.h
can_vyb.h
canLib.lib
TdxAllLibraries.dll
In addition, in your Can_Demo, in both functions (read and write) the “dataLen” field of the tCanMsg structure is filled before the call of the read/write function.
I’m working hard with CAN over the VF61 so I will be grateful if you can guide me to a solution.
I’m also noticing that many times when I call the function Can_Write or Can_Read all the system freeze, and I have to reset the system and start again.
On the other hand, I also noticed that there is no status of the can bus in the can.h or can_vyb.h, is it planning in the roadmap?
I found the following link (Toradex Community) where I downloaded a driver and code example of CAN done from you. I could use it and came to the following conclusions:
The dlc is updated correctly on incoming messages, unlike the library, although still happening that sometimes the system freezes when trying to send a message, but luckily I was able to determine in what situation this occurs. When the system starts from powering on, the first time that the application send a message the system freezes.But if the system starts from a reset everything works correctly, summarizing:
When the system starts from a reset the CAN transmission works well, but if starts from powering on, transmits a message and freezes.
We are able to reproduce the same issue here. Still not able to solve this issue, so could you please wait for some more days. We will get back you soon.
We found the reason for this issue and implemented a Fix. Please download and use our latest CAN driver from here.
Please keep this driver in FlashDisk and modify driver loading path at