Example_S32K144_I2C_Master_MPL3115A2_S32DSR1_v3

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

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
****************************************************************************************

标记 (2)
附件
评论

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

%3CLINGO-SUB%20id%3D%22lingo-sub-1125255%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E7%A4%BA%E4%BE%8B_S32K144_I2C_Master_MPL3115A2_S32DSR1_v3%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1125255%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3Dutf-8%22%20%2F%26gt%3B%0A%3CP%3E****************************************************************************************%3CBR%20%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6%97%A6%E5%87%86%E5%A4%87%E5%A5%BD%EF%BC%89%E3%80%82%3CBR%20%2F%3E----------------------------------------------------------------------------------------------------------%3CBR%20%2F%3E%E6%B5%8B%E8%AF%95%E7%A1%AC%E4%BB%B6%EF%BC%9AS32K144EVB-Q100%EF%BC%8CBRKTSTBC-P3115%3CBR%20%2F%3E%E5%8D%95%E7%89%87%E6%9C%BA%EF%BC%9AS32K144%200N57U%3CBR%20%2F%3E%20IDE%EF%BC%9AS32DSR1%E3%80%81OpenSDA%3CBR%20%2F%3E%E7%9B%AE%E6%A0%87%EF%BC%9Ainternal_FLASH%3CBR%20%2F%3E%20****************************************************************************************%3C%2FP%3E%3C%2FLINGO-BODY%3E
无评分
版本历史
最后更新:
‎11-25-2018 01:09 PM
更新人: