2014-05-31 12:37 PM
Hello Friends,
I bought stm32f4 discv. board and also http://www.aliexpress.com/item/1-pcs-MPU-6050-Module-3-Axis-Gyroscope-Accelerometer-Module-for-Arduino-MPU-6050-Worldwide-FreeShipping/1361575363.html board but i havent get it worked yet; my 3 different codes hangs at same code line while(!I2C_CheckEvent(MPU6050_I2C, I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED)); I simply use 4 wire : VCC -->3V GND -->GND SCL--> PB6 SDA-->PB9 can someone help me thnks. Mustafa2014-05-31 01:01 PM
can someone help me thnks.
Be sure that the I2C slave address is correct. The 7-bit address goes in the high-order 7-bits of the byte. Check you get an ACK signal with a scope or logic analyzer.2014-05-31 01:14 PM
Thank you Mr Clive.,
How can i be sure for the slave adrees of the cheap aliexpress product i send email to seller but not sure whether he can send me correct information. Like many i used library; #define MPU6050_ADDRESS_AD0_LOW 0x68 // address pin low (GND), default for InvenSense evaluation board #define MPU6050_ADDRESS_AD0_HIGH 0x69 // address pin high (VCC) #define MPU6050_DEFAULT_ADDRESS (MPU6050_ADDRESS_AD0_LOW<<1) and guessed 0x68 , i have no logic analyzer or event a multimeter. Find many code but all stuckt at same line. Dont know how to progress ...2014-05-31 02:48 PM
I don't see a schematic, so will assume AD0 has that 4K7 pull down, and SDA/SCL have the 2K2 pull-up.
Looks to have an LDO, consider finding the 3V3 supply on the the DISCO, or the 5V one. The address as sent by the STM32 should be (0x68 << 1), I don't see enough code to confirm that. You'd want to make sure the pins you have used are not conflicted on the STM32F4-DISCO Make sure the I2C clocks are running. You can look at the signals, you can look at the code.http://www.google.com/search?q=gy-521