Skip to main content
Associate
October 11, 2023
Question

Conecting sensor VL53L5CX from proximity16click to a NUCLEO-H755ZI-Q I2C

  • October 11, 2023
  • 1 reply
  • 2339 views

Hi,

I'm new in working to microcontrollers and I have an issue with connecting this sensor to my mcu. I'm using the library en.STSW-IMG023 with the example of the mcu STM32F401RETX. For any reason, when I connect it through I2C, the address doesn't work using the function "isalive". I don't know if I'll have to change something in .c files or in RCC to adapt this code to my STM32 board (I already changed stm32f4xx.h to stm32h7xx.h in the file platform.h). I know I have a long way to learn in this area, but any tip would help me to my project. 

Thanks you.

    This topic has been closed for replies.

    1 reply

    Foued_KH
    ST Employee
    October 11, 2023

    Hello @frj12 , 

    Make sure that you are using the correct address.
    Connect an oscilloscope and check the SDA and SCL behavior.

    Foued

    To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
    frj12Author
    Associate
    November 9, 2023

    I managed to communicate the sensor and the microcontroller through another i2c connection (i2c4), I was trying to connect it through i2c1. 

    My microcontroller has 2 cores, cm4 and cm7, and 3 domains. The RCC is in domain 3 and the i2c1 is in domain 2. I2C4 protocol is in domain 3, so i dont need any bus between domains 2 and 3 for the i2c connection to work. Anyway, I would like to try connecting the sensor and the microcontroller through the i2c1 connection, using the clock signal from domain 3. Could you help me with this problem? I'm not sure how to enable the bus so that they interact with each other. I am using the stm32cubeide software. 

    Thanks for your response.

    Fran.

    Foued_KH
    ST Employee
    November 9, 2023

    Hello @frj12 , 

    I think you need first to create a new project without STSW-IMG023 lib using HAL functions ( basic project )  .
    Verify your sensor HW connection. 
    If it works then you can use the STSW-IMG023 lib.
    Which board do you use ?

    Foued

    To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.