Example_S32K144_I2C_Master_MPL3115A2_S32DSR1_v3

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

Example_S32K144_I2C_Master_MPL3115A2_S32DSR1_v3

Example_S32K144_I2C_Master_MPL3115A2_S32DSR1_v3

****************************************************************************************
Detailed Description:
This is a rather simple example that shows LPI2C0 in Master mode.
MPL3115A2 sensor is used as a slave device.
I2C bus at PTA2 SDA, PTA3 SCL (2-pin open drain mode),
external pull-up resistors on BRKTSTBC-P3115 board.
BRKTSTBC-P3115 supplied from P3V3 (J3.7).
Baud rate 400kHz, source SIRCDIV2 8MHz.
The master reads periodically MPL3115A2 status register (every 200ms)
and temperature / altitude data once they are ready.
-------------------------------------------------------------------------------------------------------
Test HW: S32K144EVB-Q100, BRKTSTBC-P3115
MCU: S32K144 0N57U
IDE: S32DSR1, OpenSDA
Target: internal_FLASH
****************************************************************************************

Tags (2)
Attachments
Comments

Hello, 

I am using this code for i2c protocol between s32k144(master) and lidar lite v3(slave). I have configured the addresses and registers properly. I am receiving distance values , however I have to reboot the sensor to get new values. I tested the sensor with other boards , it works fine. This sensor does not support repeated start hence I have edited the read and write accordingly. 

pastedImage_1.png

I am attaching my modified code below. Could you tell me what could be my mistake?

Any help appreciated!!

LidarV3.7z - Box 

Thank you,

Arjun.

Hello Arjun,

Can you please scope the bus and compare it with the specified lidar lite v3 I2C protocol?

Do you see any error flags?

pastedImage_1.png

Thanks,

BR, Daniel

No ratings
Version history
Last update:
‎11-25-2018 01:09 PM
Updated by: