I2C communication with STM32F100

Status
Not open for further replies.

amor88_star

Newbie level 4
Joined
Apr 21, 2009
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,371
hello

I am trying to communicate STM32F100C8T6B micro controller with MMA8653 Accelerometer using I2C
I sent the start condition and the adrress in correct way and I traced it using scope
the address is 0x3A but no ACK received from the Accelerometer.
this is the image of the Data and clock but no ACK



and also I tried to use I2C bit banging but the rising time and falling time of the port pin is 20 micro_second which exceed the max time in datasheet
and this is the waveform and how can I make the rise time and fall time max 300 nanosecond



thanks in advance
 
Last edited by a moderator:

how do you use i2c ? by pin toggling in software?

what is your clock frequency ? 20 microsecond pin rise time seems that you are using a very very slow clock frequency or a software emulation of i2c with delays maybe ??

according to

https://www.st.com/web/en/resource/technical/document/datasheet/CD00251732.pdf

page 63

2. fPCLK1 must be at least 2 MHz to achieve standard mode I2C frequencies. It must be at least 4 MHz to
achieve fast mode I2C frequencies. It must be a multiple of 10 MHz to reach the 400 kHz maximum I2C
fast mode clock.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…