cancel
Showing results for 
Search instead for 
Did you mean: 

Setting up I2C1 on STM32L152

RPowe.9
Associate

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

1 REPLY 1
Imen.D
ST Employee

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen