2019-05-27 12:09 AM
I am trying to integrate VCNL4040 with stm32, but having issues in that, is there any library available for integrating the same.
2020-01-10 10:08 AM
I have the same concern as you. I connected the VCNL4040 to an STM32L0 series MCU. It seems I am able to write to the sensor, but not able to read. I connected the same sensor to the Arduino Uno board and everything worked well. There are some minor difference in the signals observed on Oscilloscope, between the STM32 and Arduino boards.
Could you resolve your problem? Do you have any comment on my problem?
Thanks.
2024-01-16 02:00 AM
I had the same issue first.
The problem was that I2C read procedure requires a "repeated start" condition instead of "Stop/Start" between Write and Read procedure.
Do not use HAL_I2C_Master_Transmit and HAL_I2C_Master_Receive combination to read a register.
Use HAL_I2C_Mem_Read only which performs a repeated start condition --> VCNL3040 works