This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

We are trying to interface the VL53L1X with nrf52832. but "slave address = 0x52" is not getting reflected in the address register of TWI0.

1. Slave address is not reflected in the address register of TWI0.

2. other information is reflected in registers like operating frequency, SDA, SCL as well as enable.

3. due to the problem of the slave address is not getting reflected, I2C communication isn't established with the sensor.

4. please give me all possible suggestion for solving this logical error regarding it.

Parents
  • Hello,

    You should first try to run the TWI Scanner example from the SDK to verify that your hardware connections is correct. The example will scan through all devices on the TWI bus and report any found devices in the log. If all your hardware connections are correct and the TWI Slave is operating as intended it will be found here.

    Please also make sure that you have DEBUG defined in your preprocessor defines, like shown in the included image.

    This will make a detailed error message be output by your logger in the case that a non-NRF_SUCCESS error code is passed to an APP_ERROR_CHECK.

    Are you using the TWI or TWIM driver in your application? It would be helpful to see the section of the code where you are using the TWI peripheral.

    For future reference, please use the Insert -> Code option when sharing code here on DevZone.

    On another note it seems that you are getting a lot of non-zero error codes in your log - what are these, and where do they originate?

    Best regards,
    Karl

  • Hello Karl,

    1. Here is the detail for the hardware connection (nRF52832 -> VL53L1X).

    2. According to me, there is nothing that goes wrong with the hardware connection

    3. We had studied the datasheet of the VL53L1X.

    4. Even there is no driver available in the SDK for this sensor. Can u provide the driver of this???

    5. Please refer the image. 

  • Thank you for providing the drawing.
    Which pins are you using for this on the nRF52832?
    The TWI driver by default enables external pullups. Have you disabled these? How much resistance is the resistors R1-R4?
    Could you also confirm whether or not you are working with a nRF52 DK?

    ShubMane said:
    2. According to me, there is nothing that goes wrong with the hardware connection

    Do you have access to a logic analyzer, so we could take a look at what might be happening on the lines?

    ShubMane said:
    4. Even there is no driver available in the SDK for this sensor. Can u provide the driver of this???

    Unfortunately we do not provide drivers for all third party sensors in our SDK, but if you have an existing driver written in C it should not require too much work to port it to the nRF52832.

    Best regards,
    Karl

Reply
  • Thank you for providing the drawing.
    Which pins are you using for this on the nRF52832?
    The TWI driver by default enables external pullups. Have you disabled these? How much resistance is the resistors R1-R4?
    Could you also confirm whether or not you are working with a nRF52 DK?

    ShubMane said:
    2. According to me, there is nothing that goes wrong with the hardware connection

    Do you have access to a logic analyzer, so we could take a look at what might be happening on the lines?

    ShubMane said:
    4. Even there is no driver available in the SDK for this sensor. Can u provide the driver of this???

    Unfortunately we do not provide drivers for all third party sensors in our SDK, but if you have an existing driver written in C it should not require too much work to port it to the nRF52832.

    Best regards,
    Karl

Children
No Data
Related