-
Hi, I have made a custom board with an STM32G030F6P6, and I can't use the hardware I2C. I know that in this particolar chip I can't use the Serial and the I2C1 in the same time because the PB7 pin it's used by both, so I don't use the serial. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Heve you wired pullup resistors on each I2C lines? |
Beta Was this translation helpful? Give feedback.
-
Ok, at least after hours of test I reach the achievement! |
Beta Was this translation helpful? Give feedback.
I guess you used the
Generic G030F6Px
variant.The default the Wire instance is:
Arduino_Core_STM32/variants/STM32G0xx/G030F6P/variant_generic.h
Lines 94 to 100 in 4e22018
The
_R
is for remap pins. So this is normal it does not work by default and this is the normal behavior.As you want use another pins by default, you can:
-DPIN_WIRE_SDA=PB9 -DPIN_WIRE_SCL=PB8
Wire.Begin()
(see h…