cancel
Showing results for 
Search instead for 
Did you mean: 

i2c using std periph library

davidrojas9
Associate II
Posted on February 13, 2012 at 18:12

Hi. Anyone has a complete example of use of the i2c protocol (in master and slave mode) for the STM32F4 using the std periph library? the examples included in the library are very confusing, I want an example for generic i2c communication, not application specific code like the EEPROM example.

#i2c-example
3 REPLIES 3
raffael
Associate II
Posted on February 15, 2012 at 08:22

Hello,

I would suggest you to have a look at: https://github.com/yigiter/Sample-STM32F4-codes

The example/library doesn't cover slave mode, but the functions for master mode communication are genereic and therefore verry helpful to understand i2c setup and communication.

Best regards

davidrojas9
Associate II
Posted on February 19, 2012 at 11:22

Thanks, but I already knew that site. Like you said, it doesn't cover slave mode, and besides it doesn't use the std peripheral library for communications, only for the init setup, the rest is done writing/reading registers. I'd like to have a simple working example using only the library (write/read and check events functions).

khaled3310
Associate II
Posted on December 20, 2012 at 17:43

Hi ,

Im wondering if I can use the same STMF4 board as a slave and master in I2C communication  in the same time and send for example from PINB8 and 9 to PINB10 and 11??