title: STM32 - I2C in interrupt mode doesn't works
body: <p>I am using a STM32 board to send I2C commands to a I2C slave using interrupt mode.
  I have initialized I2C module as below,</p>
  <pre><code>  hi2c2.Instance = I2C2;
    hi2c2.Init.Timing = 0x00303D5B;
    hi2c2.Init.OwnAddress1 = 0;
    hi2c2.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
    hi2c2.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;
    hi2c2.Init.OwnAddress2 = 0;
    hi2c2.Init.OwnAddress2Masks = I2C_OA2_NOMASK;
    hi2c2.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE;
    hi2c2.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE;
    if (HAL_I2C_Init(&amp;hi2c2) != HAL_OK)
    {
      Error_Handler();
    }
    /** Configure Analogue filter
    */
    if (HAL_I2CEx_ConfigAnalogFilter(&amp;hi2c2, I2C_ANALOGFILTER_ENABLE) != HAL_OK)
    {
      Error_Handler();
    }
    /** Configure Digital filter
    */
    if (HAL_I2CEx_ConfigDigitalFilter(&amp;hi2c2, 0) != HAL_OK)
    {
      Error_Handler();
    }
  </code></pre>
  <p>And for transfer I use the HAL API,</p>
  <pre><code>HAL_I2C_Master_Transmit_IT(&amp;hi2c2, 0x60, buffer, 2);
  </code></pre>
  <p>But this code doesn't seem to work for me.</p>
  <p>In buffer, first byte is the register address on the I2C slave and second byte is the data.
  When I use the blocking mode API,</p>
  <pre><code>HAL_I2C_Master_Transmit(&amp;hi2c2, 0x60, buffer, 2,HAL_MAX_DELAY);
  </code></pre>
  <p>It works fine. Any suggestions what could be wrong here?</p>