title: stm32f4xx HAL lib & PCF8457AT - no response to write
body: <p>I have stm32f4-discovery kit and I want to try i/o expander for hd44870 LCD . I have PCF8574AT <a href="https://www.google.pl/imgres?imgurl=https%3A%2F%2Fobrazki.elektroda.pl%2F5751132900_1498502783.jpg&amp;imgrefurl=https%3A%2F%2Fwww.elektroda.pl%2Frtvforum%2Ftopic3353758.html&amp;docid=fsnL7SM1Nfqi6M&amp;tbnid=qqS88iJWrrKbsM%3A&amp;vet=10ahUKEwjenbSw38jXAhXECJoKHTWwCMAQMwg5KBMwEw..i&amp;w=2838&amp;h=1257&amp;client=firefox-b&amp;bih=1057&amp;biw=2146&amp;q=PCF8574AT&amp;ved=0ahUKEwjenbSw38jXAhXECJoKHTWwCMAQMwg5KBMwEw&amp;iact=mrc&amp;uact=8" rel="nofollow noreferrer">link to io example like mine </a>8-bit expander where i2c address is 0x3f (checked by i2c scanner) on hi2c3 hardware. For c/c++ use HAL libraries on Eclipse environment. Ok take look at code. </p>
  
  <p>First I initialize i2c3 - like Datasheet 100kHz on SCL:</p>
  
  <pre class="lang-c prettyprint-override"><code>static void MX_I2C3_Init(void)
  {
  
    hi2c3.Instance = I2C3;
    hi2c3.Init.ClockSpeed = 100000;
    hi2c3.Init.DutyCycle = I2C_DUTYCYCLE_2;
    hi2c3.Init.OwnAddress1 = 0;
    hi2c3.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
    hi2c3.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;
    hi2c3.Init.OwnAddress2 = 0;
    hi2c3.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE;
    hi2c3.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE;
    if (HAL_I2C_Init(&amp;hi2c3) != HAL_OK)
    {
      _Error_Handler(__FILE__, __LINE__);
    }
  
  }
  </code></pre>
  
  <p>Then try to send data to I/O expander. But before that I check that i/o is ready to use:</p>
  
  <pre class="lang-c prettyprint-override"><code>result = HAL_I2C_IsDeviceReady(&amp;hi2c3,0x3f , 2, 2);
  if (result == HAL_BUSY)
          {
            HD44780_Puts(6, 1, "busy");
          }else{
              HD44780_Puts(6, 1, "ready");
              uint8_t data_io = 0xff;
              HAL_I2C_Master_Transmit(&amp;hi2c3, 0x3f, data_io, 1, 100);
          }
  </code></pre>
  
  <p>On a same expander nothing changes. Any ideas what is wrong or maybe i/0 expander is broken ?</p>