I2C时钟信号外部拉低1S异常无法恢复

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

I2C时钟信号外部拉低1S异常无法恢复

628 Views
qiurenguo
Contributor I

你好,我们使用RT1052芯片,测试发现如果把I2C SCL信号拉低1S后,在进行读取I2C芯片,无法正常操作,然后对I2C接口重新初始化后,有addr,reg波形发出,但是还是不能正常操作.需要在LPI2C_RTOS_Transfer内添加延时调度才能正常,如果这样的话,应该I2C是正常了,但是RTOS不正常,我们读写操作如下,帮忙看下是否不正常:

```

status_t status = kStatus_Fail;
lpi2c_master_transfer_t masterXfer = { 0 };

touch.ns2009_cmd = _cmd;

masterXfer.flags = kLPI2C_TransferDefaultFlag;
masterXfer.slaveAddress = NS2009_ADDR;
masterXfer.direction = kLPI2C_Write;
masterXfer.subaddress = 0;
masterXfer.subaddressSize = 0;
masterXfer.data = &touch.ns2009_cmd;
masterXfer.dataSize = sizeof(touch.ns2009_cmd);

// status_t status = LPI2C_MasterTransferBlocking(TOUCH_I2C, &masterXfer);
if (touch.lpi2cInit) {
status = LPI2C_RTOS_Transfer(&touch.master_rtos_handle, &masterXfer, 1000);
}
return status;

```

0 Kudos
Reply
1 Reply

585 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @qiurenguo ,

 

请问你的project是基于官方SDK开发的吗?我没有在SDK包里找到关于LPI2C_RTOS_Transfer的定义。

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply