cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement a I2C communication in NUCLEO-L152 board

YOEL BEN NAIM
Associate

Hi 

I am a newbie to ST microcontrollers.

I want to connect a simple I2C slave device to my NUCLEO-L152RE board. I also used CUBEMX to configure the I2C and generated the code.

Does anyone know a simple step by step tutorial for the communication itself (video or note)?

3 REPLIES 3
Amel NASRI
ST Employee

Hi @YOEL BEN NAIM​ ,

Why don't you start with examples provided in STM32CubeL1 package? There are already ones that are dedicated to be used with STM32L152RE-Nucleo with one or 2 boards.

Please refer to projects under following folders:

  • STM32Cube_FW_L1\Projects\STM32L152RE-Nucleo\Examples_LL\I2C
  • STM32Cube_FW_L1\Projects\STM32L152RE-Nucleo\Examples\I2C

-Amel

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.

YOEL BEN NAIM
Associate

Thank you Amel!

I will look into it.

Can you tell me what is the difference between the examples and the examples_LL?

The Low Level (LL) is a more simplistic abstraction closer to bare-metal/register level.

Don't have the L1 repository installed, but there are usually I2C drivers for assorted board, sensors and EEPROM type devices.

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