Hello,
I am currently trying to work myself into the User Manual of the DWM3000 to build a custom driver for it as the API is not working on my device.
As a first step I just try to send data from one device to another. One device periodically sends a package, the other one listens. So its a very simple “Hello World” example.
Both devices sit on my table 10cm apart from each other. I am using an STM32 Nucleo board in combination with DWM3000EVB and power it over the USB port of my computer.
I have the weird behavior that the receiver receives the data only on seldom events. In the other cases, it either receives nothing or tells Receive SFD timeout or Receiver PHY Header Error in the SYS_STATUS register.
Both receiver and transmitter use the default values for preamble, data rate etc… I only have done the following steps to configure them:
Both:
-
Activate PLL
- set AINIT2IDLE bit in SEQ_CTRL
-
Calibrate RX.
- in RX_CAL set CAL_MODE to 01, CAL_EN to 1 and COMP_DLY to 0x2
- After RX_CAL_STS was set to 1, reset CAL_MODE to 00 and reset RX_CAL_STS
- RX_CAL_RESI and RX_CAL_RESQ both are 0x10888210 before and after the calibration. Is this normal?
Transmitter:
-
Write length of data:
- In TX_FCTRL write length + 2 (because of CRC) to TXFLEN. Because length + 2 <= 127 I do not need extended length data frames
-
Write data into TX_BUFFER
-
Send CMD_TX
-
Wait till TXFRS in SYS_STATUS is set.
-
reset TXFRS in SYS_STATUS
-
Wait 1000ms and then redo
Receiver:
- Send CMD_RX
Afterwards I check the important bits in SYS_STATUS, as said before very seldom I receive the data sent by the transmitter (I send HELLO, I receive HELLO, so I actually receive the correct packet and not something else.), but 95% of the times something goes wrong.
I can read the device ID, SYS_TIME… and all other registers I have read so far have the values after reset as defined in the manual. So I am pretty confident that this is not a problem of a bug in the SPI configuration.
Have I missed an important configuration step or might this be a problem with the hardware?
Thank you for your help.
Best,
devjalx