cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 not passing EV6 on I2C

szbrozek9
Associate II
Posted on September 06, 2012 at 07:13

I'm having some difficulty communicating with a TI INA219 using an STM32F407VE and I2C1 on PB7 and PB8. Sending data seems to work just fine, but receiving it does not. Namely, my EV6 (I2C_EVENT_MASTER_RECEIVER_MODE_SELECTED) check seems to time out despite receiving a valid ACK from the slave device.

ina219.c is here:

http://pastie.org/private/rovbmbyxbqpu3fxlopgltw

In particular, line 169 is the region of failure.

Notice the valid ACK at the end of the trace:

http://i.imgur.com/B8HRZ.png

I've tried increasing the timeout and decreasing the clock speed, but there appears to be no change in behavior. Enabling and disabling ACK on the master also has no effect. I'm uncertain why I'm not hitting EV6.

While I'm aware of some crippling errata on the STM32F1 with regard to I2C, I don't see anything quite so severe on the F4. On the whole my impression of the STM32 I2C peripheral is a little less than deluxe thus far.

Any help is most appreciated!

-Sasha
0 REPLIES 0