Skip to main content
RPowe.9
Visitor II
September 17, 2018
Question

Setting up I2C1 on STM32L152

  • September 17, 2018
  • 1 reply
  • 597 views

I'm having a problem which appears to relate to initialisation of the I2C. When I turn on the clock to the I2C1 it sets the busy flag. Sometimes when setting up the GPIO this flag clears, sometimes it doesn't! Could someone point me at guaranteed reliable code. Thanks

This topic has been closed for replies.

1 reply

ST Technical Moderator
September 19, 2018

Hello @Community member​ ,

I recommend you to have a look to the I2C example under the STM32CubeL1 firmware package: STM32Cube_FW_L1_V1.8.1\Projects\STM32L152RE-Nucleo\Examples\I2C\

This will help you on the configuration and initialisation of I2C and GPIO.

Kind Regards,

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks