cancel
Showing results for 
Search instead for 
Did you mean: 

how to use i2c standard library

ali2003a
Associate II
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.
4 REPLIES 4
chen
Associate II
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
Associate II
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
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
ST Employee
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 Accept as Solution on the reply which solved your issue or answered your question.