Sterling
DIIDevHeads IoT Integration Server
•Created by Sterling on 10/18/2024 in #firmware-and-baremetal
Issues with I2C Communication to VL53L0X Sensor Using STM32F103C8 Without ST Library
I am using the VL53L0X sensor with an STM32F103C8 microcontroller and want to communicate with the sensor directly over I2C without using ST's library. My goal is to minimize project size and better understand the low-level protocol.
I’ve initialized the I2C interface using CMSIS and am sending commands like setting the control register and reading measurement data, but I’m getting inconsistent responses.
See how I initialized the i2c:
Has anyone successfully worked with the VL53L0X directly over I2C without the library? Any tips on improving communication?
If the ST library is necessary, could someone explain how to integrate it with CMSIS? I prefer CMSIS due to size constraints and learning purposes, but I'm open to using the library if needed.
Any help would be appreciated!
6 replies