Integrating DWM3000EVB with nRF52832

We are evaluating the DWM3000EVB. We are currently integrating the driver with a controller based on the nRF52832. We have found the DWM3000 API Software and API Guide in the expected place:

https://www.qorvo.com/products/p/DWM3000EVB#documents

And have also found API related info here:

We are aware that the DWM3000 can run up to 36 MHz and the elements of the software bundle we downloaded is configured for 32 MHz operation. The nRF52832 has an upper limit on its clock frequency of 8MHz (while the nRF52840 can run up to a max of 32 MHz) and therefore opted to modify the following file:

…\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\Build_Platforms\nRF52840-DK\Source\platform\deca_spi.c

Specifically, we made the change:

frequency_fast = NRF_SPIM_FREQ_32M to frequency_fast = NRF_SPIM_FREQ_8M on line 60 of deca_spi.c

We also changed the SPI instance ID because the NRF52832 has only instances 0, 1 and 2. The specific changes were “SPI3” to “SPI2” on lines 67 through 70 in deca_spi.c.

We noted that our libraries / our application firmware leverage newer versions of the nRF52 SPI driver, and that the DWM3000 API software provided leverages legacy nRF52 SPI drivers. We do not have access to the DWM3000 API source code and therefore are unable to port the code to function with the standard nRF52 SPI driver.

We used a CMake build process to reference the library pointed out below (libdwt_uwb_driver-m4-hfp-6.0.7.a) along with some of our own drivers developed for the nRF52832. We have used an appropriate linker script – the solution compiles without error or warning.

We used the static, .a library:

…\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\Shared\dwt_uwb_driver\lib\libdwt_uwb_driver-m4-hfp-6.0.7.a

Using our compiled build, we then tried a minimal example in the software + documentation bundle:

…\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\Src\examples\ex_00a_reading_dev_id\read_dev_id.c

Our main.c includes a simple call to read_dev_id.c and a segger_rtt_printf call / print statement in order to validate the device id read. During our attempted run of this application, we ensured that the DWM3000EVB was properly connected to our embedded hardware / nRF528320.

On running the compiled application, we encounter a crash at line 50 of read_dev_id.c:

dev_id = dwt_readdevid();

No error message or warning is returned. At this point we are at a stand-still, we’re lacking info on why the simple example does not run to completion. Any guidance on troubleshooting is greatly appreciated.

Here are some specific questions:

  1. Is the API expected to operate at 8 MHz?
  2. Is there a version of the DWM3000 API which is built on current NRF52 SPI libraries?
  3. Would making the changes noted above affect the operation of the static library? In order to operate at 8 MHz, do the set of changes we mention above represent ALL of the required, or have we missed something / are there other changes which are needed?
  4. We expect that the source code is not available – any guidance on adapting the DWM3000 API to the NRF52832 is greatly appreciated.

Any comments are greatly appreciated

Hello, did you ever get an answer to this? I’m having the exact same issue with the nRF52840 and I’ve traced it to branch to a memory location in RAM that is all zeros, so it seems to have something to do with the way the driver archive file was created. Also, I could not get their SPI interface source code to work so I wrote my own with the same prototype as theirs.

Download QNI project it is definitely working, also download qm33-sdk it is also working

Can you provide links? The version of the QM33 package I downloaded doesn’t have any archive files in it, just a couple of hex files.

I found the archive files, but before I go down this path, where should I start with implementing TWR with the QM33 SDK? Is there an example for a standalone TWR application?

So I have seemingly 2 different frameworks here. One is the QM33 “SDK” and the other is the DW3XXX “API”, the latter of which has all the examples. Are these two completely separate implementation paths, or are they supposed to work together? I see in the HAL folder of the SDK there are implementations of the readfromspi and writetospi methods which are very different from the ones in the API. I’m just trying to do a SS TWR between two DWM3000’s using the nRF52840, so if you could provide details as to the initializations necessary and where to find all the functions needed for the SS TWR (I presume using the examples 06a and 06b in the API) using the latest version of the driver (libdwt_uwb_driver-m4-hfp-6.0.14.a is what I have as the latest) that would be great. Note that I am bare metal (no FREERTOS). Or alternatively, tell me why the version 7 driver is failing in the way that I describe at the top of this thread and how to fix it.

QM33120WDK1 - Qorvo you can get a copy of the source code and you can see how to correctly initialize your code for future use in your project.

DWM3000EVB - Qorvo - here I found a link for |DWM3000 API Software and API Guide
08/2022|

Yes, QM33-SDK, QNI and API are different frameworks