STM32f103 interfacing with adxl345 via i2c

Thread Starter


Joined Apr 3, 2019
I am working on interfacing ADXL345 accelerometer with stm32f103 blue pill board through I2C communication. I have written the code in keil software by surfing the internet which works fine sometimes, verified using logic analyzer.
The problem is sometimes the BUSY bit is set after starting communication. I do not know why this arises. after searching related to this problem I found that the I2C clock must be enabled before configuring gpio to alternate functions. But the problem is not solved I stuck with this Busy bit.

any ideas are welcome

thank you.