5 years, 10 months ago.

MBED I2C hangs when I insert wait();

I have a very odd problem where the I2C bus doesn't run AT ALL if I have a wait(); function call in my program. Absolutely nothing to be seen on my scope whatsoever. As soon as I remove it then the bus will run.

Is there an issue with the i2c library that causes this?

Additional info: I am using an MBED lpc1768, communicating with a wolfson wm8731 audio codec on a pik mikroe board. I have attempted using pull up resistors on the i2c lines from anywhere between 1k and 10k and still get this issue.

I may add that I have this exact same issue if I add a wait(); call at any point of the i2c example program mbed provide. ..

posted by Rory Hand 03 Jun 2018
Be the first to answer this question.