cancel
Showing results for 
Search instead for 
Did you mean: 

Is there an I2C example for the L4 that uses the Cube_MX for initialization?

JBonn
Associate III

Trying to interface with the LSM303AH eCOM.

1 ACCEPTED SOLUTION

Accepted Solutions
Foued_KH
ST Employee

Hello @JBonn​ ,

For I2C communication with LSM303AH ,you need to configure your I2C using STM32CubeMX then you can generate the code and manage your communication using HAL library .

I recommend you follow this wiki for more details about the MX configuration : Getting started with I2C - stm32mcu

Hope my answer helped you!

Foued

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.

View solution in original post

3 REPLIES 3
Foued_KH
ST Employee

Hello @JBonn​ ,

For I2C communication with LSM303AH ,you need to configure your I2C using STM32CubeMX then you can generate the code and manage your communication using HAL library .

I recommend you follow this wiki for more details about the MX configuration : Getting started with I2C - stm32mcu

Hope my answer helped you!

Foued

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.

Foued,
Thanks. You answered my question.
Found example that directly applied to my case.
Jerry Bonner

If this solves your problem, please mark my answer as "Best Answer" by clicking on the "Select as Best" button, this can be helpful for Community users to find this solution faster. 

Foued

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.