Associate III
February 20, 2012
Question
I2C Problem with STM32F103ze and Sensor
- February 20, 2012
- 3 replies
- 711 views
Posted on February 20, 2012 at 21:28
Hi,
according to my thread in my native language (german): http://www.mikrocontroller.net/topic/249457&sharp2558731 I wanted to find a solution for my problem. I have Keil + STM32F103ZE + ITG3200 (http://invensense.com/mems/gyro/documents/PS-ITG-3200-00-01.4.pdf Gyroscope Sensor. Connected on I2C1 and a second ITG3200 sensor on I2C2. At the moment I'm trying to read out the sensor on I2C1. But I get stucked in the line:/* Test on EV5 and clear it */
while
(!I2C_CheckEvent(ITG_I2C, I2C_EVENT_MASTER_MODE_SELECT)); and Line: ErrorStatus I2C_CheckEvent(I2C_TypeDef* I2Cx, uint32_t I2C_EVENT) in the STM32f10x_i2c.c I directly connected SCL (PB6) to the Sensor SCL and the SDA (PB7) to SDA. My Board uses a 16mhz HSE and the Std.Lib is configured for that. At the Screenshots in the first links you will see the Clock's and I2C Registers I attached my code. Maybe some one has a solution. Thanks for help with regards Sven //Links: Link to sensor manual: http://invensense.com/mems/gyro/documents/PS-ITG-3200-00-01.4.pdf #i2c-stm32