cancel
Showing results for 
Search instead for 
Did you mean: 

I2C

ankushkhare89
Associate II
Posted on August 03, 2016 at 15:51

Hello

I have configured my STM32F405 board in the I2C master receiver mode.

I am able to get interrupt for the start bit in the ISR.

Now I am not able to clear the ISR flag. I tried to read out the I2C1_SR1 register with SB bit, but it is not resetting the flag. Also the CR1 register is read only. How can I reset the interrupt flag for start condition so that next time I will again get the interrupt for Start condition ? 
3 REPLIES 3
Radosław
Senior II
Posted on August 03, 2016 at 18:01

an2824

ankushkhare89
Associate II
Posted on August 04, 2016 at 08:14

hello, 

I am a bit new to programming. 

Can you please explain it ? I mean in NVIC vector which one to clear ?
Nesrine M_O
Lead II
Posted on August 04, 2016 at 10:12

Hi  khare.ankush,

“I am a bit new to programming�

The STM32CubeF4 firmware package provides a set of examples showing how to use the I2C in master/slave communication, based on polling, interrupt and DMA programming models. You can start from these examples to do your own:

STM32Cube_FW_F4_V1.13.0\Projects\STM32F4-Discovery\Examples\I2C 

-Syrine-