Skip to main content
qqGHUAN
Associate
Apr 14, 2022 2:35 PM UTC
Question

I2C_FLAG_TXIS is always in RESET state!!

Hi,

I would like to use the I2C2 (from I2C3) in "STM32G474_MB1303_DRP_ONLY"

besides, modify I2C3_SDA to I2C2_SDA (pc9 to pa8),

I2C3_SCL to I2C2_SCL(pc8 to pa9),

the AF to GPIO_AF4_I2C2,

and use __HAL_RCC_I2C2_CLK_ENABLE to enable clock for i2c2

but I2C2 seemed not to work!!

I used DEBUG to found it will fall into loop of I2C_WaitOnTXISFlagUntilTimeout

the I2C_FLAG_TXIS flag is always "RESET".

is there something I missed??

could you kindly provide me a hint?

Thanks a lot

This topic has been closed for replies.

1 reply

qqGHUAN
qqGHUANAuthor
Associate
Apr 15, 2022 5:37 AM UTC

because I use the B-G474E_DPOW1, and the PA8 is used for blue led on board

that is why the I2c2 not working