Getting Context Corruption error while calling Imx7Can_Read()

Hi,

in my application i get the following error while calling Imx7Can_Read():

CAN Error: .\src\config_parser.c, 411: Context Corruption
Application.exe has triggered a breakpoint.

First I init and open the CAN driver (this is fine):

if ((hCan = Imx7Can_Init("CAN1")) == NULL)
{
	return ERROR;
}

Imx7Can_SetConfigInt(hCan, L"ioTx", 55, StoreVolatile);
Imx7Can_SetConfigInt(hCan, L"ioRx", 63, StoreVolatile);
Imx7Can_SetConfigInt(hCan, L"BitRateHz", wBaudrate * 1000, StoreVolatile);
Imx7Can_SetConfigInt(hCan, L"IstPriority", 12, StoreVolatile);
Imx7Can_SetConfigString(hCan, L"FilterFrameFormat", L"None", StoreVolatile);
Imx7Can_SetConfigString(hCan, L"FilterRemote", L"None", StoreVolatile);
Imx7Can_SetConfigInt(hCan, L"FilterID", 0x00, StoreVolatile);
Imx7Can_SetConfigInt(hCan, L"FilterMask", 0x00, StoreVolatile);
Imx7Can_SetConfigInt(hCan, L"Timeout", 1000, StoreVolatile);    // optional, default = 1 sec

if (!Imx7Can_Open(hCan))
{
	hCan = INVALID;
	return ERROR;
}

My application worked until the new release of the CE Libraries. Maybe you can reproduce the issue.

Best regards

kuzco

With preliminary release v2.1b4386-20180426 it works. But if I do not receive a CAN message and a timeout occurs it always prints out

CanLib Read Warning: Timeout occurred

This is a little bit annoying :slight_smile:

Dear @Kuzco
Thank you for the feedback.
I added your input about the warning into our feature and bug tracking system. We will discuss in our regular developer meeting how much time we can spend to improve this.
Regards, Andy

Please also refer to the related post

Dear @Kuzco

We introduced the warning CanLib Read Warning: Timeout occurred and did not realize that it always appears in the normal use case where you try to poll for a CAN message and none was received.

We will remove the message it in the next library release V2.3. Meanwhile you have the following options

  • Ignore the message
  • Use the release version of the libraries which doesn’t output these kind of warnings.
  • If both is not acceptable, ask us for a preliminary version of the libraries with the message removed.

Regards, Andy