Question
STM32F100 I2C problem
Posted on December 02, 2013 at 10:43
Hi
I have a board with an STM32F100 microcontroller communicating with an LSM303DLM accelerometer/magnetometer and an L3G4200D gyroscope. I have managed to get the communications working but in order to do this I have had to put a delay after each I2C command, and it only works if the microcontroller runs with the default 8MHz internal RC clock, regardless of the value of the APB1 peripheral clock feeding the I2C unit, and also independent of the I2C bus frequency.Without these delays, or at other clock frequencies, the uC is unable to even send a START condition correctly.The uC runs off 3.1V, the I2C lines are pulled up to the 2.7V of the sensors I/O supply with 10k resistors.Does anybody have any idea why this is happening, and/or what I can do to enable the uC to run at full speed.RegardsMichael Taylor #stm32f1-i2c