I am going to create a library for the DWM1001-DEV in C++. For this, I will use the SPI library provided by the PANS Library. However, I cannot seem to find some easy SPI read/write operations from the nRF chip to the DWM1000 chip. Can somebody link me to these examples or, if possible, provide me these examples? Thank you.
Thanks for the fast reply. It seems this is indeed what I am looking for. I can also not seem to find this SPI library in the “DWM1001_DWM1001-DEV_MDEK1001_Sources_and_Docs_v9” folder, when downloading this from the dwm1001 product page. Do you happen to know why this is not the case?
Hi Marc!
You cannot find that library simply because it is not there. Use this repo code and add it to your own project - this code works well, at least for me
Sorry, forgot about it, if needed, fix the next functions to:
OK Mark, I don’t know anything about these features:
dwt_writetodevice
dwt_readfromdevice
I’m using the functions from legacy port_platform.c:
/ *
Read data from DW1000
/
int readfromspi (uint16 headerLength, const uint8 * headerBuffer,
uint32 readlength, uint8 * readBuffer)
{
and
int writetospi (uint16 headerLength, const uint8 * headerBuffer,
uint32 bodylength, const uint8 * bodyBuffer)
If you prefer, please use these, they work well. I read/write to/from DW1000 in DMA mode (nrfx_spim) - it works fine.
And I’m under FreeRTOS - it’s not sufficient
Thanks, I’ll try both functions. By the way, do you happen to know an IDE like CLion or Visual Studio sort of template I can use? Segger Embedded Studio does not even have the feature to rename variables.