cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L496ZG +MPL3115A2 interface

RPate.4
Associate

I am using STM32L496ZG nucleo board for interface MEMS MPL3115A2 Sensor using I2C interface . First i am scanning I2C device and find attached device too.But after scanning device whenever i tried to read Who am i register , i don't receive correct data and receive 0X00 instead of register value.

Datasheet for breakout board -https://cdn-shop.adafruit.com/datasheets/1893_datasheet.pdf

Code for Scanning device and read Who am i register using STM32Cubeide.

/*define--------------------------------------*/

0693W000003QtjUQAS.png

/*Scan device----------------------------*/

0693W000003QtkXQAS.png

/*Read who am i register--------------*/

0693W000003QtkmQAC.png

And this is settings to configure I2C in STM32cubMX.

0693W000003QtnlQAC.png

This Sensor breakout board is working with other controllers finely ,But not with this STM32 board .

Please help me out from this . Is there any changes need to do in Hardware or in configuration?

2 REPLIES 2
Eleon BORLINI
ST Employee

Hi @Community member​ ,

I added STM32 topics for more support. I would suggest you to check the operating voltage of MPL3115A2. 3.3V should be OK. Please note that on the sensor datasheet is reported that "This board/chip uses I2C 7-bit address 0x60", so you have to make sure you are communicating I2C 7-bit (seems OK from your screen). You can double-check whether this is true if the device address you get with the scanning is actually 0x60.

-Eleon

Eleon BORLINI
ST Employee

Hi @Community member​ ,

do you have any news on this topic from your side?

-Eleon