cancel
Showing results for 
Search instead for 
Did you mean: 

error in vl53l8cx_check_data_ready

HarukiTanaka
Visitor

 

I am currently trying to control a VL53L8CX sensor via SPI communication from the microcontroller mounted on a Crazyflie drone.

However, inside vl53l8cx_check_data_ready(), the values in temp_buffer became as follows. Indices [0] to [2] look correct, but at temp_buffer[3], the condition

 

 
((p_dev->temp_buffer[3] & (uint8_t)0x10) == (uint8_t)0x10)

evaluates to false.

What exactly is this comparison checking?

When temp_buffer[3] returns an incorrect value like this, which specific part of the communication or control process is likely failing?

  • temp_buffer[0]: 0x0
  • temp_buffer[1]: 0x5
  • temp_buffer[2]: 0xC5
  • temp_buffer[3]: 0xC1
0 REPLIES 0