The user manual flowchart for carrying out double buffer receives suggests that you don’t re-enable rx until after reading all buffers but if that is the case then what is the point compared to single buffer operations. It also doesn’t specify at which point CMD_DB_TOGGLE mentioned in the text on the previous page should be sent.
the double buffer is used to store information in one buffer while the other one can be used to store newly received data at the same time. The pdf you added shows exactly that: the “CMD_RX” command gets sent, if a frame is received, check if buffer A or B got written to, do whatever you need to do with the information in that buffer and then (if “RX more frames” is true aka if you want to receive more frames) re-enable the receiver with the CMD_RX command.
You could also call the CMD_RX before reading the buffer information to have a longer overall listening time.
From my understanding, the CMD_DB_TOGGLE command should be issued after reading all the things you need from your buffer. Your workflow should be like this:
CMD_RX wait for frame reception frame received (gets stored to buffer A)
CMD_RX (The chip knows that buffer A is used and switches to B automatically) chip: wait for frame reception | host: read buffer A
CMD_DB_TOGGLE (when finished with reading buffer A and any diagnostics you need from that buffer) frame received (gets stored to buffer B)
…CMD_RX, read buffer B, etc…
To clarify, issuing the CMD_DB_TOGGLE does NOT actually toggle the buffer directly but rather lets the chip know that the buffer information is not needed anymore and could be overwritten when the chip needs to, aka after the other buffer was written to. Chapter 4.4.2 of the DW3000 user manual addresses this in prettier words