Hi,
I want to use a DWM1000 to setup a ranging system with my own board (ModalAI VOXL).
For starters I am trying to get the examples from this repository running: GitHub - Decawave/dwm1001-examples: Simple C examples for Decawave DWM1001 hardware
I am able to read the Device ID of the DWM1001 succesfully, so reading via SPI apparently works.
However, I cannot get it to write anything so far.
I read APS022 and used the check that was suggested in there:
uint8 dataA[10] = { 1,1,2,3,5,8,13,21 };
uint8 dataB[10] = { 0,1,2,3,4,5,6,7,8,9 };
dwt_writetodevice(0x21, 0, 10, &dataA[0]);
dwt_readfromdevice(0x21, 0 , 10, &dataB[0]);
int i;
for (i = 0; i < 10; ++i) {
printf("%" PRIu8 "\n", dataA[i]);
};
for (i = 0; i < 10; ++i) {
printf("%" PRIu8 "\n", dataB[i]);
};
uint8 devIdData[5] = {0,0,0,0,0};
dwt_readfromdevice(0x00, 0 , 5, &devIdData[0]);
int j;
for (j = 0; j < 5; ++j) {
printf("%" PRIu8 "\n", devIdData[j]);
};
This returns all 255
from the 0x21 register, so the write did not seem to work.
From the 0x00 register, however, I get the sequence 48, 1, 202, 222, 0
, which seems to be correct.
I am using SPI Mode 0
and a frequency of 2000000 Hz (2 MHz)
.
The cables connecting the VOXL and the DWM1000 are roughly 15cm, so I don’t think this is critical, right?
What can I do to find the cause of the problem?