cancel
Showing results for 
Search instead for 
Did you mean: 

I2C bad electrical ACK?

tescaflown
Associate II
Posted on April 27, 2015 at 20:45

Hello,

I try to use I2C between STM32F103 + ATMEGA32.

Side ATMEGA, my I2C program Master/Slave works at 300% sure in all mode.

Side STM32, that's the part I try to make work.

In first test, STM32 is in Master Transmit (at 25KHz) and ATMEGA is just slave receiver.

- STM32 send start -> ok

- STM32 send Address + Write -> ok ( ATMEGA goes well in slave receiver and ready to accept data )

But I have always ACK failure on STM32 side.

Look my screen scope of electrical measure:

http://hpics.li/430a5d2

We can see that the ATMEGA try to low the line but don't success to do it. That's my problem.

Pull-up is 2.2KOhms resistor, Like I said I'm sure ATMEGA works fine, I tested it with another IC. But as soon as I plug it to STM32, ATMEGA can't low the line to ACK.

That's my first shot with STM so if someone has an idea? I put PINB6 and PINB7 in alternate output function, is it right?

Thanks,

Tesca.

2 REPLIES 2
Posted on April 27, 2015 at 21:00

alternate function, open-drain, pull-up

If you use push-pull at either end it will fail.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
tescaflown
Associate II
Posted on April 27, 2015 at 21:05

Hello,

yep, I just found. Thanks for your answer you were faster than me and were right. That's was well my problem, I use alternate function in Push-Pull instead Open-Drain.

Best regards,