2015-04-27 11:45 AM
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: 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.2015-04-27 12:00 PM
alternate function, open-drain, pull-up
If you use push-pull at either end it will fail.2015-04-27 12:05 PM
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,