how to enable accessable of I2C1 in win10IOT system

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

how to enable accessable of I2C1 in win10IOT system

Jump to solution
1,224 Views
jiangyaqiang
Contributor IV

Dear NXP team
 

   I'm porting the WIN10IOT  v1.1.0 to our IMX8MP project ,and there is a problem with I2C1.

   The problem is , it can't access the i2c1 after system bootup(I2C1 is enabled in UEFI already).

   And I found that after install i2c driver, I2C1_SCL and I2C1_SDA pin change to low all the time, if uninstall i2c  driver,these pins change back to high. i2c2 and i2c3 don't have this problem.
What is the reason for this,  have any suggestions?


Best Regards

0 Kudos
1 Solution
1,156 Views
jiangyaqiang
Contributor IV

HI all:

 

    Fininally , I found that , it's the problem of PMIC driver in uboot, it will be ok if not enable PMIC.

View solution in original post

5 Replies
1,188 Views
Frantisek_Prochaska
NXP Employee
NXP Employee

Hi @jiangyaqiang ,
We actually observed similar behavior with an I2C device that took unexpectedly long time to respond. 
You could try to multiply timeout value on all four places in imx-windows-iot\driver\i2c\imxi2c\imx_hw.cpp or pick i2c driver binary from newer release while somebody looks at your logs:


timeoutMax = ( 1000 * 1000000 ) / DeviceCtxPtr->CurrentTargetPtr->Settings.ConnectionSpeed;

EDIT:
I am actually curious. Does the problem happen only when communicating with a particular IC?

0 Kudos
1,186 Views
jiangyaqiang
Contributor IV

hi nxa15248:

          I have tried the to enlarge the timeout, but no help.

         And it happens in all device(four devices tried).

1,200 Views
michal_hromadka
NXP Employee
NXP Employee

Hello @jiangyaqiang 

Could you please attach those files ?

1.) mu_platform_nxp\NXP\"board_name"\Library\iMX8BoardLib.c 

2.) mu_platform_nxp\NXP\"board_name"\AcpiTables\Dsdt-I2c.asl

 

And could you create WPP trace file for I2C driver?  

 

Regards, 

Michal

0 Kudos
1,198 Views
jiangyaqiang
Contributor IV

HI michal_hromadka

 

    Thanks for your reply.

   I have attached the file you mentioned above. And one more file Dsdt-Rhp.asl, which changed to make sure i2c test tool (I2cTestTool.exe) can list the i2c1, and a succes log file log-read-i2c2-device-success.txt which access i2c2.

  More information about it : I have used Windbg tool step by step to debug, and found that after set the control reg(see the picture below), the SCL and SDA pull to low, and never high again.

fail-pos.png

0 Kudos
1,157 Views
jiangyaqiang
Contributor IV

HI all:

 

    Fininally , I found that , it's the problem of PMIC driver in uboot, it will be ok if not enable PMIC.