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

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.

9 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
Principal
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