MPL3115A2

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

MPL3115A2

1,259 次查看
sergiogianti
Contributor I

Hi

i hope some one can help me, i try to use this sensor with STM32F051, after i send the data for configurate the sensor i try to read WHO_IM but i didn't receive the correct answer, i configurate int1 output pull up and then interrupt is generate on the falling edge, and i can see with my logic analyzer he work. I really don't understand why i receive the wrong data. I hope some one can help me

Thank you

Sergio:smileycry:

标签 (1)
0 项奖励
回复
2 回复数

1,064 次查看
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Sergio,

Could you please post here the waveforms to review what is going on the I2C bus?

 

A single byte read from the WHO_AM_I register (0x0C) should look like this:

WHO_AM_I reg read.JPG

And here is a burst read of 5 bytes from registers 0x01 to 0x05. It also shows how the INT1 pin is automatically deasserted by reading the output data registers.

Burst+Read.JPG (1).jpg

You might find useful my simple example code for the MPL3115A2 that is published here.

I hope it helps.

Regards,

Tomas

PS: If my answer helps to solve your question, please mark it as "Correct". Thank you.

0 项奖励
回复

1,064 次查看
sergiogianti
Contributor I

Hi Tomas,i have a problem to post the waveform, i follow your code but still the problem. One question for you but you use the dummy read ? and if yes can you help me because i don't understand how really work. When i try to read the data (right now i just try WHO_IM) the answer is the same 0XEE without use interrupt , i really don't understand

Thank youSergio

-


Messaggio originale----

Da: admin@community.freescale.com

Data: 22-mar-2016 9.49

A: "Sergio Gianti"<sergiogiovanni.gianti@tin.it>

Ogg: Re: - MPL3115A2

a

body {

font-family: Helvetica, Arial, sans-serif;

-webkit-text-size-adjust: 100%;

}

/* Webkit */

h1, h2, h3, h4, h5, h6, p, hr {

-webkit-margin-before: 0;

-webkit-margin-after: 0;

-webkit-margin-start: 0;

-webkit-margin-end: 0;

}

.button td {

background-image: -moz-linear-gradient(top, #75B7E3 0%, #5498D6 50%, #408BD0 51%, #387AC8 100%) !important;

background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#75B7E3), color-stop(50%,#5498D6), color-stop(51%,#408BD0), color-stop(100%,#387AC8)) !important;

-webkit-box-shadow: inset 0 1px 0 #74b9de, 0 1px 3px rgba(0,0,0,.3) !important;

-moz-box-shadow: inset 0 1px 0 #74b9de, 0 1px 3px rgba(0,0,0,.3) !important;

}

-->

NXP Community

MPL3115A2

reply from Tomas Vaverka in Sensors - View the full discussion

Hi Sergio,

Could you please post here the waveforms to review what is going on the I2C bus?

A single byte read from the WHO_AM_I register (0x0C) should look like this:

And here is a burst read of 5 bytes from registers 0x01 to 0x05. It also shows how the INT1 pin is automatically deasserted by reading the output data registers.

You might find useful my simple example code for the MPL3115A2 that is published here.

I hope it helps.

Regards,

Tomas

PS: If my answer helps to solve your question, please mark it as "Correct". Thank you.

Reply to this message by replying to this email, or go to the message on NXP Community

Start a new discussion in Sensors by email or at NXP Community

Following MPL3115A2 in these streams:

Inbox

This email was sent by NXP Community because you are a registered user.

You may unsubscribe instantly from NXP Community, or adjust email frequency in your email preferences

0 项奖励
回复