cancel
Showing results for 
Search instead for 
Did you mean: 

Using DMA for communication with ToF sensor VL53L7CX

MŻbik.1
Associate II

Hello,

Standard library for ToF sensors, as far as i know, works in blocking mode and it needs few seconds to initialize sensor and later on to gather all of 64 results. In my project I need to handle other process during this time and using DMA seams like proper move. Is there any alternative library that might solve my problem?

2 REPLIES 2
Anne BIGOT
ST Employee

Hello

The only thing ST is providing is the driver with its own library. No alternative library is provided.

Regards

Anne


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'
AlexCloned
Senior

@Mikołaj Żbikowski​ If, by chance, you happen to implement DMA for communications, it would be great if you could share it on this forum. DMA access will be hardware-dependent, so you will need to rewrite the platform (platform.c). Additionally, you will likely need to divide the API functions that currently perform result reading in blocking mode throughout the entire communication. In other words, there will be an initiator function for DMA communication and a completion/restart function for DMA, perhaps an interrupt handler, buffer extraction, and result formatting. Lastly, your application will need to handle communication states as it should relinquish control after initiating communication and resume once it is completed.

@Anne BIGOT​ and ST Staff: As you know, a fixture with four sensors, enabling all possible result options, operating at 15 Hz x 64 zones, would occupy 100% of the time with blocking communications. Therefore, I understand that the ULD without DMA has limited practical utility.

You're welcome. If it hasn't been considered before, it doesn't seem too complicated, and surely if you were to implement DMA through the ULD, it would be, very, very advantageous. It would prevent everyone from modifying the driver all the time, with the resulting challenges of maintenance, tracking, and updating of these libraries.

I am assuming communications are implemented over the old and known I2C.

Regards.