Skip to main content
ankushkhare89
Associate II
Aug 3, 2016 1:51 PM UTC
Question

I2C

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 ? 
    This topic has been closed for replies.

    3 replies

    Radosław
    Associate II
    Aug 3, 2016 4:01 PM UTC
    Posted on August 03, 2016 at 18:01

    an2824

    ankushkhare89
    Associate II
    Aug 4, 2016 6:14 AM UTC
    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
    Associate
    Aug 4, 2016 8:12 AM UTC
    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-