cancel
Showing results for 
Search instead for 
Did you mean: 

I2C is not working for receiving data - RXNE flag is not getting set

sandeepBJadhav
Associate II

Hi,

I am working on STM32MP133FAFx (I2C Master) for I2C communication with STPMIC1 IC (I2C slave) fast mode(400KHz) and HSI clock(64MHz). I2C->TIMINGR = 0x00C0216C

For writing data TXIS flag is getting send and I am writing the register but when trying to read data back from PMIC RXNE flag is not getting set and RXDR register is not showing data.

Configuration for reading & writing data is done as per the example code provided by ST

i.e. used  HAL_I2C_Mem_Read() & HAL_I2C_Mem_Write() functions for 1 byte data transfer.

 

Please help me how to resolve this issue and provide me the solution.

 

1 ACCEPTED SOLUTION

Accepted Solutions
PatrickF
ST Employee

Hi @sandeepBJadhav 

low level I2C could be quickly checked using a simple oscilloscope probing SCL and SDA.

Then you could check:

- possible issue with bus level/timing (e.g. missing 1.5k pull-ups)

- correct I2C sequence including address/RW/ACK

- presence of STPMIC1 answer

PatrickF_0-1730135134603.png

 

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
PatrickF
ST Employee

Hi @sandeepBJadhav 

low level I2C could be quickly checked using a simple oscilloscope probing SCL and SDA.

Then you could check:

- possible issue with bus level/timing (e.g. missing 1.5k pull-ups)

- correct I2C sequence including address/RW/ACK

- presence of STPMIC1 answer

PatrickF_0-1730135134603.png

 

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.