I2C1 ACK is not getting enabled in stm32f446re
I have configured the GPIO for I2C1(Alternate function 4) and enabled the Clock for I2C1. After that I am trying to enable the ACK. but not able to enable that.. Also tried for I2C2 and I2C3 facing the same issue.
//enable the clock for the I2C peripheral
I2C_PeriClkControl(pI2CHandle->pI2Cx, ENABLE);
// ack control bit
uint32_t tempreg = 0;
tempreg |= (pI2CHandle->I2C_Config.I2C_AckControl << 10);
pI2CHandle->pI2Cx->I2C_CR1 |= tempreg;
I also tried manually in debug mode. Not able to SET ACK bit of CR1 register of any I2C(I2C1/I2C2/I2C3)
Any idea how to resolve this issue?
Can anyone help please
