2025-09-12 9:51 AM
Dear ST,
The VL53L8CH's example codes have demonstrated how the sensor can be controlled through set of APIs. However I am still not very sure about how can I switch between different working modes on-the-fly during runtime.
For example, assume I have set the sensor to work under CNH output mode, by using API from cnh_plugin
vl53lmz_cnh_init_config () and then vl53lmz_start_ranging ().
Then I need to change the mode back to basic ranging mode, i.e., I do not need CNH data output anymore, just want default data output. What should I do to cancel it? Do I just have to
vl53lmz_stop_ranging (), and vl53lmz_start_ranging () again?
Similar question exists for other modes like when working under motion indicator mode, and then again I need to switch to basic ranging mode (without CNH data or other plugins, etc.).
I did not find a clear answer from the examples provided. Your hints will be appreciated.
/Roland
Solved! Go to Solution.
2025-09-15 2:30 AM
Hi,
Sorry, the VL53L5/7/8 sensors don't support dynamic changes of output data while ranging.
To enable / disable CNH output you will have to stop ranging, modify the blocks of data you wish to receive from the senosr using the vl53lmz_add_output_block()/vl53lmz_disable_output_block() functions then restart the sensor using vl53lmz_send_output_config_and_start(). If you just want to disable CNH output you shouldn't need to reconfigure other CNH settings (you can leave it configured but not uploading data to the host). But if you need to switch between Motion Indicator operation and CNH output you would have to do more reconfiguration due to the fact that configuration space and processing is common between them in the sensor firmware.
Hope this helps.
Roger
2025-09-15 2:30 AM
Hi,
Sorry, the VL53L5/7/8 sensors don't support dynamic changes of output data while ranging.
To enable / disable CNH output you will have to stop ranging, modify the blocks of data you wish to receive from the senosr using the vl53lmz_add_output_block()/vl53lmz_disable_output_block() functions then restart the sensor using vl53lmz_send_output_config_and_start(). If you just want to disable CNH output you shouldn't need to reconfigure other CNH settings (you can leave it configured but not uploading data to the host). But if you need to switch between Motion Indicator operation and CNH output you would have to do more reconfiguration due to the fact that configuration space and processing is common between them in the sensor firmware.
Hope this helps.
Roger
2025-09-18 4:45 AM
Thank you Roger, for the detailed information.