Apalis T30 I2C timeout

I am using I2C1 on X27 (Ixora board) to communicate with my I2C devices which has been function well.

However, after connecting the 10.1 touch screen and installing the capacitive multi touch solution for WEC2013, my program hangs in I2c_Open() function call. The error from debugger is:

eI2C Error: .\src\i2c_teg.c, 867: TimeOut waiting for Mutex

I understand that X27 and X24 sharing the same I2C1 bus. Is there a way to get around this conflict?

Dear @yzoupri,

Thank you for contacting support. We have recently updated touch installer but yet to release. Could you test with the updated touch installer and let us know the result. If still bug persists then we are happy to solve it.

Sharing I2c bus x24 and x27 is not a problem.

Could you test the touch installer standalone without any other application and let us know the result.

Moreover, the mutex blocking issue occurs usually due to race condition of multiple threads trying to call I2c_open for a channel. I2c_open, I2c_Write or I2c_read and then I2c_close should be called within a thread and leave the resource to use by other threads.

Maybe, if possible could you share issue reproducible code with us, that will help us to look the issue quickly and solve it.

Hi,

I have tried this new touch installer and the problem is the same. To reproduce this problem, you can just use the “I2c_Demo” project in the libdemos folder supplied by Toradex CE2013 lib. The code will freeze at line 27 with the “I2c_Open” function call. The freeze seems to be having something to do with “HWAdapt_atmel.exe”.

I have tried this new touch installer and the problem is the same. To reproduce this problem, you can just use the “I2c_Demo” project in the libdemos folder supplied by Toradex CE2013 lib. The code will freeze at line 27 with the “I2c_Open” function call. The freeze seems to be having something to do with “HWAdapt_atmel.exe”.

Dear @yzoupri,

Thank you for the details. I am able to reproduce the issue with v2.3 release image. Are you using v2.3 release image? Could you wait for a couple of days, let me debug it and come back to you.

The version I am using is V2.3 (4527) – not sure if it is the release image. Sure I can wait for couple days for this.
Thanks,

Dear @yzoupri,

Sorry, I was asking about Tegra WinCE image version not toradex CE libraries version.

Yes, the CE image is v2.3 (-20190702)

Dear @yzoupri,

Thank you for your patience. We found a bug in the touch adapt application that I solved now, would like to share source code and executable binary to you. Please download it from here : Updated touch application

Could you overwrite executable application on the \FlashDisk\Autorun folder and let us know the result.

Hi Raja.tx

I was able to run the demo program with this new update – thanks for the quick response.
Is there a way to use I2C2 bus for the touch screen instead of I2C1? From Ixora datasheet, the I2C2 is available on LVDS connector (X19). I do not prefer to share the same I2C bus with my other hardware connection since they are competing resources.

Regards,

Dear @yzoupri,

This can be easily doable, please do below change in g_hi2c =I2c_Init(L"I2C2"); in TchContr_Atmel.c and rebuild the application.

For more information, please refer Toradex_CE_Libraries.chm documentation file.

Hi,

I understand that I can change the software for that. My question is more related to this specific display hardware: is the touch signal routed via I2C1 (in LVDS bus) as well? Can you confirm that is the case?

Thanks

Dear @yzoupri,

I2c channel 2 is routed to LVDS, I2c1 is routed to Touch connector(X24) and x27 connector on Ixora. If you make custom carrier board there you would route I2c1 to LVDS connector.

Ideally, Touch I2c interface you can use any I2c channel. The application layer is not hard fixed with I2c1. The HwAdapt application gets touch co-ordinates through software programming I2c channel and passing to GWES layer. Hence you can use any I2c channel to get touch coordinates and pass to GWES layer.

Please let us know if you have any other query.