I'm working on a library for STM32 to learn I2C protocol (Software I2C, not hardware).
- I remove welding on the SJ2 jumper to dont use 4.7K embedded module pullup resistors.
- I supply 5v power to the module
- My STM32 board already has 4.7K pullup resistors to 3.3V
- I connect module SDA and SCL to my STM32 3.3V GPIO with 15 cm cables.
- I connect my two way oscilloscope to SDA and SCL.
I can produce a nice SCL (100KHz) and SDA signal except for the I2C "START CONDITION", SDA take time to fall down, the falling edge is not straightforward. When I increase timing in my code I can get the DS1307 address ACK. So I suspected the resistors values not be appropriate.
I used two different GPIO without pullup resistors and I use my own 1K pullup resistors to 3.3V and this work very well. Signal is nice I can read and write successfully to DS1307 and get date/time.
So I disconnect my oscilloscope, but after that, I could not read or write to the device :(. My oscilloscope impedance is 1M. If I leave 1K pullup resistor to 3.3V AND put a 1M resistor to ground this work.
I also try with bi-directional logic level converter (BOB-12009) and this work well but I want to use DS1307 directly without converter.
- Can someone help me to understand why I need this 1M resistor ?
- What 3.3V pullup resistors value can I use to only use pullup ?
- STM32 board is an Olimex STM32F103STK
- Ground is connected between STM32, DS1307 (and oscilloscope when i plug it)
My cable got bad ground wire connector, i replace the connector and now all work fine with or without oscilloscope and with 4.7K or 1K pullup resistors to 3.3V. Empirically 2.2K seem to be a good trade-off between current and clean signal edges.