UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer bencai
Observer
3,609 Views
Registered: ‎05-12-2014

Linux IIO Problem with multiple sensor on I2C bus, race condition?

My design comprises multiple I2C sensors on an I2C bus, some sensor are mapped to sysfs as hwmon devices and rest are mapped as IIO devices.   The systme is running Linux Kernel 4.4.0  on Zynq device.  PS I2c bus runs @ 400KHz.

 

Problem:  One of the sensor (MPU6500) is configured to stream data to memory via IIO ring buffering facility triggered by a hw interrupt from the sensor.  The sensor works fine alone or with hwmon devices running concurrently pulling data of them, however when running with other IIO devices the bus would hang after a random number of data retrival interations.  The only way to recover the bus appears to be rebooting the system.

 

I suspect there is a sort of race condition within the IIO driver at the Kernel, has anyone come across issues like this, any advice as to where to problem might be?

 

Cheers,

Ben

0 Kudos
1 Reply
Observer bencai
Observer
3,602 Views
Registered: ‎05-12-2014

Re: Linux IIO Problem with multiple sensor on I2C bus, race condition?

Additional information: interrupt still comes in - observable by relavent the counter via /proc/interrupt, but it's longer being serviced subsequent to hanging.
0 Kudos