Here are the data DWM1001 sent back:D 7C FC FF FF 42 1 0 0 BC FF FF FF 0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF request for pos start Sending command, getting back these bytes: 255 255 Here are the data DWM1001 sent back:D 26 FF FF FF 50 1 0 0 1B FF FF FF 0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF request for pos start Sending command, getting back these bytes: 64 1 Here are the data DWM1001 sent back:FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF request for pos start Sending command, getting back these bytes: 18 1 Serial.print(“here are the data DWM1001 sent back:”) Serial.print("Sending command, getting back these bytes: “) Serial.println("request for pos start ") SPISettings settingsA(8000000,MSBFIRST,SPI_MODE0) I will post my code below and the Serial monitor result to show what I got back from DWM1001.Ĭan anyone give me some help? Really appreciate it! What’s more, I keep getting 0xFF back from DWM1001. I supposed I would get two 0xFF bytes back as I was sending the get_position TLV request (0x02, 0x00), I got random bytes back instead. However, the data I got back doesn’t look good. I followed exactly what the SPI Example diagram shows in the dwm1001-api-guide. In each loop, I transfer 0x02 and 0x00 at first, and keep sending 0xFF to dwm1001 until I get the return Size byte != 0x00, and then I keep transfer Size bytes of 0xFF to get the data back. ![]() Mode Clock Polarity (CPOL) Clock Phase (CPHA) Output Edge Data Capture I am not sure about the spi setting of DWM1001 so I set the speed to 8000000, the bit order to MSBFIRST(Most Significant bit first), and the SPI_MODE0 First, I connect the MOSI MISO CLK GND CS and 5V pins to the nano. I am testing the DWM1001-DEV SPI API to communicate with an Arduino Nano.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |