cancel
Showing results for 
Search instead for 
Did you mean: 

STMF446RE nucleo I2C interface does not work. This maybe a wery dumb question but how do i get my I2C to work? the initialization is created using cubeMX, after that i am just using the hal function HAL_I2C_Master_transmit().

BMave.1
Associate

So the details of the configuration are: i am using I2C3 peripheral with the clock speed of 100kHz the pins are set to open drain no pull up no pull down. I am also using external pull up ressistors.

I have already checked the internet for a solution but nothing is working. The initialization seems to be fine i even checked the datasheet for the board for its i2c and nothing seems wrong. I checked the status registers and found out that when i set the start bit using the function Hal_MasterRequestWrite the start bit in the control reegister is set but the SB flag in the status register is not set to the function returns the error code wrong start and returns hal_timeout. I even connected a osciiloscope and found that the SDA and SCL are always high and nothing is happening. The status register that describers any errors like busy are all of value 0. I checked the errata and tried the solution of reseting the peripheral but that isnt working either. Any help is greatly appreciated.

0 REPLIES 0