I2C and CAN issues (CE 2.2 libraries)


I am working on integrating v2.2 of the CE libraries into our build, and I am running into some issues with I2C and CAN.

The I2C problem is a duplicate of the issue we were having previously with v2.1 of the libraries:
It seems the issue has resurfaced with 2.2. The exception is thrown when calling I2C_Read and I2C_Write.

Additionally, I am seeing CanLib Read Warning: Timeout occurred consistently, although CAN communications seem to be sending and receiving normally.

A symptom of these issues seems to be causing the application to run slowly.

Any insight? Thanks!

Dear @echoone

I can confirm we are aware of both issues. They are already addressed and will be fixed in V2.3 of the libraries.

Some background information:

  • The context verification is done by calculating a checksum over the context memory range. Unfortunately we included one extra DWORD after the actual context into the calculation, leading to random false errors.
    The validation is only done in debug mode, so if you use the release version of the libraries, you will not see it.
  • The CanLib Timeout warning is shown even if the timeout is expected, e.g. if there is currently no message available to read. We decided to remove this message.
    Again, in the release version of the library, the message is not shown.

Here is a preliminary version with both issues (Context Curruption and CAN Timeout) fixed. You can use this one as a workaround, until we release the official V2.3 library package.

Regards, Andy

Using the release libraries works perfectly. Thank you!


Is there a reason the validation check is not performed in the release version of the libraries?

Dear @echoone
The check costs performance. And under normal conditions the context should never get corrupted - This only happens due to a bug in the libraries, or your application writing to memory through an invalid pointer.
Regards, Andy