2018-03-27 07:38 PM
I'm using stm32f051R8Tx(stm32f0discovery) and I'm trying to connect with i2c devices
I used HAL-driver that CUBEMX provides and i succeeded to communicate with i2c LCD device(LCD1602A).
LCD works really well.
However, I also used mpu6050, i2c gyro sensor, in a same code, I cannot get this thing work.
I used debug session and it seems like acknowledge problem.
there are some people who have similar issues and they solved this problem with shifting address to the left.
so I tried address left shifting as well but mine doesn't work.
anybody can help?
2018-03-28 12:41 AM
I'm using stm32f051R8Tx(stm32f0discovery)
So this:
http://www.st.com/en/evaluation-tools/stm32f0discovery.html
?I also used mpu6050, i2c gyro sensor, in a same code, I cannot get this thing work.
Do they work individually?
None of these things is actually part of the
stm32f0discovery - so you must have added them externally.
How have you confirmed that your wiring is correct?
I used debug session and it seems like acknowledge problem.
That's a good start - so what further investigation/testing/debugging have you done based on that observation?
http://www.8052mcu.com/faqs/120313
The obvious first question (after checking wiring) is: do you have the Slave Addresses correct?
2018-03-28 02:40 AM
so I tried address left shifting as well but mine doesn't work.
How did you left shift the address?
Are you using the same code for all the other devices you mentioned? If that's the case, do pay attention to I2C timing register values(derived from Cube MX), Slave address? I2C pull-up resistors?