6 days, 6 hours ago.

K64F I2CSlave does not receive, hangs in

So this question was solved by a library change a long time ago ( I tried posting on that topic, but apparently it didn't gather much attention. Here's the issue that I'm seeing, so you don't have to wander off to read it on the old topic:

I'm essentially using the I2CSlave example code from the mbed OS reference (, but I'm using a K64F with the slave on I2C1 (PTC11 and PTC10).

On an oscilloscope, I can see the address ACK, I can see the master ACK when the slave writes, but the slave will not ACK when written to by the master, e.g. during[0], 1). I flip the blue LED when in the I2CSlave::WriteAddressed case of the switch, and the LED changes, then the code hangs on the read statement. I know it hangs because I try flipping the LED back directly after the read, but it stays on.

I tried my code on an LPC1768 (after changing the pin numbers) and it works fine....

This smacks of a library problem for the K64F. It was repaired in 2014, so the only thing I can figure is that it got broken again during the upgrade to mbed 5.0.

Can anyone verify this for me? Thanks in advance for any help.


- Just Gary

Comment on this question

1 Answer

6 days, 5 hours ago.

You could check older versions of the mbed lib to verify that it worked in the past. Select mbed lib in your project, the window in the upper right hand shows the current lib version, you can then click on ''revisions'' to show other versions. Select the desired version, click ''change'' and recompile.

To post an answer, please log in.