cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L5 + Nucleo-401RE: I2C communication buggy

RAltm
Senior

Hi,

I'm using CubeIDE 1.9.0 with X-Cube-TOF1 package 3.0 on a Nucleo-F401RE with VL53L5A1 expansion.

I want to create the simple ranging example application with additional crosstalk calibration. I followed the steps from software package user manual UM2974, chapter 4.2.1 to create the application and enabled crosstalk calibration. No other changes are done. The instructions are written for CubeMX, not CubeIDE, but I think I've done it right.

But the serial connection always shows sensor init failed. Even disabling crosstalk calibration doesn't show any effect - this setup should reflect exactly the same as the provided pre-compiled binary, I assume.

Debugging into the application shows bus acknowledge failure. Also, trying to communicate with the VL53L5 using the ULD driver (not using anything from the TOF1 package) doesn't work reliable, the I2C interface often hangs.

There are no modifications to the hardware. I've no idea why nothing from example source codes or Cube packages works out of the box. Only the pre-compiled binaries seem to work. So, I assume there's something wrong with my MCU configuration. Any ideas what might be wrong?

Regards

1 ACCEPTED SOLUTION

Accepted Solutions
RAltm
Senior

Update: somehow I managed to reset the I2C port assignment in the CubeMX project, so other ports were used and the failed initialization was because there was no communication with the L5 device. That's my fault. Too bad that the Nucleo extension doesn't capture this.

A real error is that UM2974 doesn't mention that the interrupt for the blue push button (EXTI13) must be enabled if you're using crosstalk calibration. The corresponding screenshot only shows EXTI4 enabled, which is the IRQ line of VL53L5. Without enabled PB IRQ, the software won't do anything if crosstalk calibration is enabled.

Regards

View solution in original post

1 REPLY 1
RAltm
Senior

Update: somehow I managed to reset the I2C port assignment in the CubeMX project, so other ports were used and the failed initialization was because there was no communication with the L5 device. That's my fault. Too bad that the Nucleo extension doesn't capture this.

A real error is that UM2974 doesn't mention that the interrupt for the blue push button (EXTI13) must be enabled if you're using crosstalk calibration. The corresponding screenshot only shows EXTI4 enabled, which is the IRQ line of VL53L5. Without enabled PB IRQ, the software won't do anything if crosstalk calibration is enabled.

Regards