I have an application where and ESP32 connects to DWM1001C vi UART using TLV commands.
I see the reply from a given commands comes back almost immediately but how can my ESP32 determine when it can issue the next command and not interfere with a command that takes a while to execute.
For example: I issue dwt_pos_set command and get response but the data must take time to write to the DWM1001C flash to store the values. How do I know when it has completed? Or, can I simply send the next command even though it is still writing data and DWM1001C will stack up the commands ?
The documentation just states hundreds of ms but this is vague and it gives no indication of write tining etc in the API manual.
this depends on many variables 8-). Lets say that most of the answers should should get within few milliseconds like 10msec. Some commands that need FLASH interaction could take up to few hundreds milliseconds as the working with flash need 100% of the CPU time so it is planned to some point in future when it would not corrupt the UWB system. The API system has lower priority than the UWB operations.
Our experience is maximally 400msec for commands that need FLASH.
So there is no way of knowing when actions from a command has been completed if they write to flash so you need to add say 500ms delay after all of them to make sure?
yes you are correct. The UWB has the most priority to not lost the sync with UWB network and the flash driver has to wait…