5748G:My I2C module Can not reset

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

5748G:My I2C module Can not reset

773 Views
sunhuajun
Contributor I

Hi Nxp

   I am using mpc5748G with I2C module,I am master node.There is only one master node.

   I found that when there is somthing wrong with I2C bus such as a slave node make the sda line to low(hang up),

I have to make the io founction to gpio mode and then create Extra Clock by my self,and then recover the IO mode to I2C Scl or Sda mode .

   sometimes I see that slave node is not hang up and the master node(5748g) hang up the Sda line or Scl line,I try to Reset the Moudle use the Reg pI2Cx->IBCR.B.MDIS = 1; and then pI2Cx->IBCR.B.MDIS = 0; This step in manual tell me it will reset the Module ,but after that the Bus not Recover.

   The Sda and Scl is set to Open Drain mode and Internal Wake Pull up and There is 4.7K Pull up Resistance.

0 Kudos
1 Reply

718 Views
PetrS
NXP TechSupport
NXP TechSupport
Hi,
usually the SDA low level holding is caused by slave device, when the communication is interrupted somehow, slave is outputted low and expecting another clocks. So is the slave really holding SDA, When you disconnect it, does MCU sees SDA high? What is in fact connected on the bus?
Recovery procedure should be done by setting the I2C as I/O lines and send out clock pulses while checking the data line, as follows:
1) Master tries to assert a High on the SDA line
2) Master still sees a Low and then generates a clock pulse on SCL (1-0-1 transition)
3) Master checks SDA. If SDA = 0, go to Step 2; if SDA = 1, go to Step 4
4) Generate a STOP condition
If the Master is causing the issue, then resetting with MDIS bit should help.
BR, Petr
0 Kudos