Skip to main content
Associate
Oct 30, 2026 9:34 AM UTC
Solved

Lack of signals Issue in I2C communication on the STM32G0B1RBT6

我现在使用STM32G0B1RBT6的62 63管脚,需要使用他们I2C通讯功能。现在断开这两个端口一切外设,只留下2.2K上拉电阻。为啥示波器上面一直都没有信号,一直都是保持3.3V上拉。但是把这2个端口配置成普通的GPIO又能够电平翻转。

配置成I2C1 发数据,引脚上 测不到时钟信号。

Translation:

I am currently using pins 62 and 63 on the STM32G0B1RBT6 for I2C communication. I have disconnected all external peripherals from these pins, leaving only 2.2kΩ pull-up resistors in place. However, the oscilloscope shows no signal—the line remains held at the 3.3V pull-up level. Interestingly, if I reconfigure these pins as standard GPIOs, I am able to toggle their logic levels.

When I configure them for I2C1 and attempt to transmit data, no clock signal can be detected on the pin.

5566Best answer
Associate
Nov 10, 2026 1:03 AM UTC

he issue is resolved. It was a hardware design problem caused by the level-shifting chip. Thanks for your replies!

27 replies

mƎALLEm
ST Technical Moderator
Oct 30, 2026 9:56 AM UTC

Hello ​@5566 and welcome to the ST community,

First, please use English in this community. You should read this when you start a new thread:

Second, you need also to provide more details about the board you are using and share your code and your schematics so other can help you efficiently.

Please read How to write your question to maximize your chances to find a solution.

Thank you for your understanding.

PS: I’ve already translated your request.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
Karl Yamashita
Super User
Oct 30, 2026 7:29 PM UTC

You need to show some code you used to write/read to the I2C device. Assuming you are using HAL, you also need to check the HAL return status as that will tell you if it was successful or there was some error.

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
5566Author
Associate
Nov 2, 2026 1:38 AM UTC

Attached are the schematic, layout, and my code. We have now disconnected pins 62 and 63, leaving only the pull-up resistors R6 and R7 in place.  no signals can be measured. We have successfully brought up the UART and RS485 interfaces.

TDK
Nov 2, 2026 3:43 AM UTC

The code you attached doesn’t initialize or use I2C1 at all. It uses a software-based I2C. Since you said toggling is working when they are initialized as GPIO, it’s unclear why this code is shown.

"If you feel a post has answered your question, please click ""Accept as Solution""."
5566Author
Associate
Nov 2, 2026 4:18 AM UTC

We configured the pins for software I2C and as regular GPIOs just to verify that the hardware of these pins is intact. Below is our I2C code. The signal stays constantly high on the oscilloscope, showing a flat 3.3 V line.

EXUE.2
ST Employee
Nov 2, 2026 7:17 AM UTC

Hi,  did you enable the I2C clock? I did not see it in your code.

5566Author
Associate
Nov 2, 2026 7:28 AM UTC

It is inside the zip file I sent you, as shown in the figure.
 

 

EXUE.2
ST Employee
Nov 2, 2026 7:36 AM UTC

I saw it, thanks. since the GPIO function is OK, generally, the greatest possibility is the configurations are not downloaded to its registers, so it is better to check I2C registers value after you run it step by step.

ST Technical Moderator
Nov 2, 2026 8:48 AM UTC

Hello ​@5566 

What is the content of SR register after returning from HAL_I2C_IsDeviceReady.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om
5566Author
Associate
Nov 2, 2026 9:45 AM UTC

Please find the register values in the screenshot below for your review. Thank you.

 

TDK
Nov 2, 2026 2:38 PM UTC

If you are getting a NACK, then signals are on the line. This would indicate the peripheral is not connected or not at the address that you are probing.

"If you feel a post has answered your question, please click ""Accept as Solution""."
5566Author
Associate
Nov 3, 2026 8:08 AM UTC

Are there other diagnostic methods I can use to locate the root cause? I have spent the whole day on this issue without any progress.

David Littell
Senior II
Nov 2, 2026 3:44 PM UTC

As always, a logic analyzer trace of SDA and SCL would probably be helpful.

5566Author
Associate
Nov 3, 2026 1:04 AM UTC

We are not receiving a NACK at all. The clock signal should always be present even with the load disconnected, as removing the load is not supposed to affect the clock. However, we see no clock signal in practice.

mƎALLEm
ST Technical Moderator
Nov 3, 2026 3:42 PM UTC

Hello ​@5566 ,

As stated by ​@David Littell , you can’t debug a such issue without minimal tools such as a logic analyzer. I think you are professional, so you need to have at least a such device ..

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
TDK
Nov 3, 2026 2:50 PM UTC

What you are reporting is not consistent.

If there is no clock signal (SCL), you will not get a NACK. The peripheral monitors the SCL line and will not progress its state unless this line is active. Perhaps set some breakpoints in HAL_I2C_IsDeviceReady to see how and why it exits.

You realize the clock signal is not continuous, right? How exactly are you trying to capture it with your setup?

 

To me it sounds like the slave is not there or is miswired and everything is behaving appropriately.

"If you feel a post has answered your question, please click ""Accept as Solution""."
5566Author
Associate
Nov 4, 2026 1:06 AM UTC

Now there is no NACK, and no clock signal either. The SCL line is just stuck high as a constant high level. Could you provide an I2C driver code for STM32G0B1RBT6?

Rodo
Senior
Nov 4, 2026 2:56 AM UTC

How are u checking to see if there is a clock signal? 

5566Author
Associate
Nov 6, 2026 7:17 AM UTC

We can now measure the signals. The figure below shows the result from the logic analyzer. The slave device is connected to your VL53L8CXV0GC/1 chip. This is consistently what the MCU reads from the VL53L8CXV0GC/1.

 

ST Technical Moderator
Nov 6, 2026 8:48 AM UTC

Hello ​@5566 

If you are receiving a NACK then you should check if your i2c adresse is correct. 

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om