DW3000 Command Error

Hi

Nuwbie here. I am trying to run ex_01a_simple_tx with a DWM3000EVB on an ESP32 board using the library port by NConcepts.

After calling dwt_starttx(DWT_START_TX_IMMEDIATE), the CMD_ERR
reg:00:48 bit:8 is set and the board doesn’t proceed transmit anything as far as I can tell from the registers and monitoring from another listening board.

The User Manual says:

“Command error. Indicates that a fast command was programmed, given [sic] that will be ignored. This can happen when the host issues two commands in quick succession, if the device receives the second of the two while the first has not completed, the device will ignore the second command and raise this event.”

This cause seems unlikely as it is the first and only fast command sent by the program and the writetospi in dw3000_port.c looks fine.

AndyA reported an instance of this error here:

That was apparently due to not being in Init RC mode when attempting to start the receiver. I have checked and that is not an issue in my case. EDIT - not sure about this, problem might be that I am not in Idle PLL.

I have also followed the suggestion there to lower the SPI speed but that hasn’t helped, the SPI reads and writes also seem fine.

Running ex_02a_simple_rx also triggers the CMD_ERR at dwt_rxenable(DWT_START_RX_IMMEDIATE) although in this case it doesn’t prevent communication working and frames are received without a problem. I haven’t checked all the other fast commands yet, so I don’t know if it is fine for e.g. delayed transmission.

Is there any more guidance on what can trigger CMD_ERR? Perhaps a code that isn’t recognised etc.

Are there any suggestions on how to fix or further troubleshoot this?

Thanks all

Forcing into Idle PLL with a fast command resolves the issue. I think someone else pointed out there were some issues with PMSC in this library so I will look into that.