I2C locks forever

Hi,

I’m using beaglebone to communicate with some PIC16F through I2C2 (pins 19 and 20).
Each PIC is in its own board, and all boards are connected physically to each other though a standard connector (like a beaglebone cape).
All boards are powered with the same source power (one source for all boards)
At normal conditions, it works fine.

But sometimes the I2C bus locks and even if I unplug all the PIC boards, leaving the beaglebone alone, the I2C bus
stil continue locked. What I mean locked is that I run i2cdetect (or specific a C program with ioctl/read/write) and only get timeout for all address.
The I2C bus only works again if I reset the board.

I’m looking for a way to reset the I2C system from linux user space (or at driver lever if necessary) so I do not need to
reset the entire board to get it work. It seems that there is no ioctl that reset the I2C system in Angstrom distribution kernel.
Also, I looking for a reason to explain why this problem occur, but the reset for I2C will be very nice.

Does anybody have this problem?

Is it related to some hardware fault? What are the pull-up values for SDA/SCL you are using? Reducing the values to 1K may help (or may not !)
No idea yet of how to reset the I2C controller. I2C initializaiton code is deep down in kernel driver sources.

Hum…

Ok…I analyzed with an oscilloscope and found that there is a short (in time) but high enough noise, like a pulse, between each byte transmited. I was using a 10k pull up resistor and when I changed to a 27k the noise pulse was reduced considerable. This noise seems to be generated by a I2C level shifter from 3.3V to 5V.

I’m still testing for a long period stability (some days), but It seems better than before.

Thanks.