cancel
Showing results for 
Search instead for 
Did you mean: 

STM I2C-3 not generating a clock and data signal on one of the I2Cs.

CGrov.1
Associate II

I am running an STM32L476RG at 1.8V and have noticed that I2C-3 does not generate a clock or data signal. I have tried isolating the MCU from the rest of the circuit and found that there is still no signal at the MCU pins, so i know the circuit is not loading the chip. I have changed the MCU and still get an identical signal, and I have run the circuit with an external MCU at 3.3V with no problems. Because of all this I a confident the problem is with the MCU, although I2C-1 is working perfectly. When I look at the output of the SCL3 and SDA3 with a scope, i can see the voltae rise to about 0.9V and then slowly drop back down. In comparisson, the SCL1 and SDA1 lines of the working I2C-1 rises to about 2V, and then the clock and data signals start as the voltage level drops back down.

I am wondering if it could be a product of running it at the low voltage threshold? are there any other pins (pulled high or something?) I need to worry about when using the I2C3? I can't find anything in the datasheet about this.

10 REPLIES 10
TDK
Guru

I2C requires an external pullup as pins are driven in open-drain mode. Do you have one on the I2C3 lines?

> Because of all this I a confident the problem is with the MCU

You could be right, but I don't think you've provided enough detail to back up this claim.

If you feel a post has answered your question, please click "Accept as Solution".

Which pins? As TDK said, do you have external pullups?

Read out and check/compare to working/post content of I2C and relevant GPIO registers.

JW

The I2C does have an external pullup. The reason I believe it is with the MCU is because I can use a separate dev board to drive the circuit with no issues, it is only when I am using the on-board MCU that I have issues. So I am fairly sure that the circuit downstream from the MCU is working correctly. The dev-board is running at 3.3V vs the on-board the MCU which is only running at 1.8V. However, i have tested the dev-board at 1.8V and do not get any issues. I am also able to detect a clock signal on the dev-board right at the MCU pins, on the on-board MCU I still get a weird pulse with no clock signal. I'm thinking that there is something wrong with my layout of the MCU.

CGrov.1
Associate II

I am using pin 8 (PC0_SCL) and pin 9 (PC1_SDA), i have external pullups installed. I setup the initialisation using the CubeMX tool, and it works fine on my dev-board.

If you configure those as open drain output pins, does the voltage level rise to 1.8V?
If you feel a post has answered your question, please click "Accept as Solution".

It only rises to about 1V on each of the pins. If I set PC0, I can see a small increase in voltage on PC1 and vice versa. There is no visible short on the MCU pins.

If it’s truly isolated from everything else except the pullup resistor, seems like a hardware issue. Maybe the protection diodes failed or some other ESD damage occurred.
If you feel a post has answered your question, please click "Accept as Solution".

That's possible, I do use a strap and ESD safe clothing but you never know. The fact that it's appeared on two different MCUs though is surprising. I'll keep playing with it, thanks for your time!

Check power/ground pins (including VDDA/VSSA) first, physically, measuring continuity *directly* on the pins.

Said pullups, what do they measure on the "high" side?

JW