LPI2C example non blocking

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LPI2C example non blocking

跳至解决方案
2,687 次查看
adrianwenger
Contributor III

Hi,

i need a example for I2C master reqeuests data from a slave and waits to receive the data non blocking. The SDK only provides a example with blocking.

Regards,

Adrian

标签 (1)
0 项奖励
1 解答
2,002 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

 

Attached is a simple bare-metal example with MPL3115A2 pressure/temperature sensor, although it is blocking example, it could help.

For non-blocking algorithm please refer to AN4803 I2C Non-Blocking Communication.

 

Regards,

Daniel

Attachment updated

在原帖中查看解决方案

0 项奖励
7 回复数
2,002 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

Sorry for the late response.

The thing is that we don’t have such an example yet.

I have started working on an example with MPL3115A2 sensor,

but it is still in progress.

 

Regards,

Daniel

0 项奖励
2,002 次查看
adrianwenger
Contributor III

Hello Daniel,

thanks i'm looking forward to your solution.

BR,

Adrian

0 项奖励
2,003 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

 

Attached is a simple bare-metal example with MPL3115A2 pressure/temperature sensor, although it is blocking example, it could help.

For non-blocking algorithm please refer to AN4803 I2C Non-Blocking Communication.

 

Regards,

Daniel

Attachment updated

0 项奖励
2,002 次查看
rayray
Contributor I

Hello Daniel,

I imported the example, changed the slave address, communicated with E2PROM,but can't work both write and read reg ,there is something wrong whit it?please help!

无标题.png

#define E2PROM_ADRR_R    0xA1
#define E2PROM_ADRR_W    0xA0

thanks

Ray

0 项奖励
2,002 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello,

What do you see on scope? It is transmitting something, do you get acknowledge?

Regards,

Daniel

0 项奖励
2,002 次查看
rayray
Contributor I

Hello,

Thanks very much,Reference the E2PROM datasheet changed something,now it works well

Regards,

Ray

0 项奖励
2,002 次查看
adrianwenger
Contributor III

???

0 项奖励