11 years ago.

Problem with I2C read commands

Hi, Has anyone got a solution to the FRDM-KL25Z not responding properly to I2C read commands? Tried a quick example reading a memory calibration parameter in a BMP085 pressure sensor. Working fine on the LPC1768, but not on the FRDM board. I have checked that I have pull-ups on the SDA and SCL control lines. Have also checked using a Saleae Logic analyser and the communions stalls after writing the memory location to read. Working fine on the LPC1768 I can see the complete transaction. Is this a problem in the libraries or the silicon itself? Any work arounds? Regards Phil.

Question relating to:

2 Answers

10 years, 12 months ago.

I'm not sure but I faced similar problem. If I used 400kHz of I2C, I couldn't read WHO_AM_I register of MMA8451 which is installed at U7 of FRDM-KL25Z. But, if I changed the speed to 300KHz, it could read the register correctly. On the other hand, I checked that MMA8451 can work at 800 Hz, using IAR debugger with same FRDM board.(Maybe it is out of MMA8451's spec.) So, MMA8451 doesn't have problem. How about if you try it with lower speed of I2C?

Hiro.

10 years, 10 months ago.

This article might help determining what the issue may be. http://mcuoneclipse.com/2012/12/05/kl25z-and-i2c-missing-repeated-start-condition/