I'm experiencing some issues while probing a problematic I2C bus on the oscilloscope.
We want to interface several TLV493D-A1B6, with a STM32L4 (we are working as well on STM32F4 and have the same issues).
The STM32L4 has 4 I2C FM+ (1Mbit/s) bus. We want to use the 4 of them in order to communicate with a total of 12-16 sensors, hence 3-4 sensors per bus.
We achieved 4 sensors on the same bus as well as having 1 sensor on each one of the 4 bus.
However, we are not able to interface more sensors (i.e. 4 sensors on 4 bus or even 1 sensor on 3 bus and 2 sensors on the 4th bus). Some bus starts and continue working, some other don't start, some start and stop after couple of seconds, these behaviours being random.
While probing the bus on the oscilloscope I noticed what looks like heavy ringing when SCL (or SDA) goes from HIGH to LOW and I am wondering if it can be the source of the problem. Here you can see this ringing on the SCL line :
As you can notice, the ringing seems to be less important on the second picture. It has been taken the day after the first one, in a seperate room (different outlet for the oscilloscope) and while the first pic shows the signal with one sensor on the bus, the second one depicts the signal with 3 sensors on the bus.
Some information on the I2C bus:
Frequency : 1 Mbit/s
Capacitance : the capacitance of the bus has been determined by measuring the rising time of the signals. It has been determined that one bus has a capacitance ranging from 50 pF for one sensor to 100 pF for 3 sensors.
Pull-up resistors : 1,2 kOhms (other values have been tried, ranging from 600 Ohms to 2,2 kOhms. Lowering the value seems to improve a bit but the timing has been checked and 1,2k seems correct).
Termination : 33 Ohm series resistors have been used on each line.
Power supply : several power supply schemes has been tried for the sensors including an isolated bench power supply or the same power supply as the MCU.
The I2C lines run through relatively short cables and bread board. The capacicance has been checked and it's apparently not the source of our problem.
I am not the one responsible for the firmware but I do know that we are using DMA on the MCU in order to have 4 I2C FM+ running at the same time.
Some ideas we had but we can't clarify :
- The increasing number of sensors is responsible for a over usage of the power supply.
- The ringing comes from bad probing and is not happening when the the signals are not probed. It has been noticed that probing the signal usually leads to worst results.
Does anybody have already experienced a similar behaviour with I2C and/or does anybody have any idea to improve our set up ?
Again, what sounds strange to me is that the set up works with 4 sensors on 1 bus, it works as well with 4 sensors on 4 different busses but we are stuck when trying to go further, the goal being 12-16 sensors on the 4 bus.
PS : I can't post a schematics of our set up right now but I'll edit my post as soon as I can.