cancel
Showing results for 
Search instead for 
Did you mean: 

I2C Master - connection to sensor example project

rick2399
Associate II
Posted on December 10, 2014 at 05:43

What I would like is an example that illustrates how an STM32L1xx master

can send to and receive data from a slave--the accelerometer in this case,

across the I2C interface using the Standard Peripheral Library.  It does not

need to too hardware specific.  However, not that the slave does not have

DMA or extended I2C capabilities, or the capability to generate automatic

I2C interrupts.  Consequently, the master needs to initiate all transactions

and poll for responses.

Is it the case I download/install STM32Cube and then select I2C and study the code?  Thank you!

#stm32l1-i2c
1 REPLY 1
Posted on December 10, 2014 at 07:00

STM32L1xx_StdPeriph_Lib_V1.3.0\Project\STM32L1xx_StdPeriph_Examples\I2C\I2C_EEPROM\main.c

\STM32L1xx_StdPeriph_Lib_V1.3.0\Project\STM32L1xx_StdPeriph_Examples\I2C\I2C_TSENSOR\main.c

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..