Skip to main content
CGrov.1
Associate III
August 10, 2020
Question

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

  • August 10, 2020
  • 5 replies
  • 3099 views

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.

This topic has been closed for replies.

5 replies

TDK
Super User
August 10, 2020

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""."
CGrov.1
CGrov.1Author
Associate III
August 10, 2020

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.

waclawek.jan
Super User
August 10, 2020

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

CGrov.1
CGrov.1Author
Associate III
August 10, 2020

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.

TDK
Super User
August 10, 2020
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""."
CGrov.1
CGrov.1Author
Associate III
August 10, 2020

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.

waclawek.jan
Super User
August 10, 2020

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

TDK
Super User
August 10, 2020

It seems very odd for a pin to get pulled up to 1.0V when the rail is at 1.8V. I'm suspicious that you have something else going on with the board that isn't mentioned.

Is the voltage on the I2C3 pins also 1.0V when NRST is low?

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