cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f4 i2c

santoshpawar
Associate
Posted on July 30, 2013 at 06:32

 hi  I am santosh,

I am using stm32f407zet6 for communicating with accelerometer using i2c interrupt mode

  My problem is  after receving no of bytes to be read RXNE and BTF flag  remained set .

and after that interrupt is not genererated. I have cleared RXNE and BTF flag after I2C_STOP.

pls somebody give me proper i2c  event isr

Regards,

Santosh pawar

#i2c #stm32f4-i2c
1 REPLY 1
jpeacock2399
Associate II
Posted on July 30, 2013 at 15:56

Make sure you are sending a NAK at n-2 bytes received and a STOP at n-1 bytes.  For single byte transfers NAK must be sent before the first byte is received.  Look at the timing for EV6 and EV7 events.

  Jack Peacock