Skip to main content
ali2003a
Associate II
March 28, 2014
Question

how to use i2c standard library

  • March 28, 2014
  • 4 replies
  • 1124 views
Posted on March 28, 2014 at 11:46

Hello all,

I am trying to connect a sensor to the stm32f4 discovery board. what i want to do, i want to be able to write to the sensor and read from the sensor the data. would  you please guide me to any web resources or anything that would help me to do that on the discovery board. also is it possible to use the standard library (Hal library) to do that?

thanks guys.
    This topic has been closed for replies.

    4 replies

    chen
    Associate II
    March 28, 2014
    Posted on March 28, 2014 at 12:55

    Hi

    Try these :

    http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF252419

    The WEB page for the STM32F4 board.

    http://www.st.com/web/en/catalog/tools/PF257904

    This page contains demo software to try on the board.

    Lots of examples to try.

    ali2003a
    ali2003aAuthor
    Associate II
    March 28, 2014
    Posted on March 28, 2014 at 13:13

    hi 

    these links don't show any application or demonstration of i2c using the standard library stm32fxx_i2c

    thanks

    chen
    Associate II
    March 28, 2014
    Posted on March 28, 2014 at 13:41

    Hi

    Yes, you are right. There does not appear to be an example of I2C in the demos.

    Sorry.

    Search the forum. There are hundreds of threads on I2C!

    Look for example code from a guy calling himself 'clive1'

    He generally does the best example code.

    Amel NASRI
    Technical Moderator
    March 28, 2014
    Posted on March 28, 2014 at 16:27

    Hello,

    The STM32CubeF4 contains some I2C example (Path: STM32Cube_FW_F4_V1.0.0\Projects\STM32F4-Discovery\Examples\I2C).

    Even if the STM32F4 standard peripheral library is NRND, you still can download it from

    http://www.st.com/web/en/catalog/tools/PF257901

    . It contains some I2C examples (Project\STM32F4xx_StdPeriph_Examples\I2C) that you can update to use with your discovery board.

    -Mayla- 

    To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.