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:
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:
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:
Using our compiled build, we then tried a minimal example in the software + documentation bundle:
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:
- Is the API expected to operate at 8 MHz?
- Is there a version of the DWM3000 API which is built on current NRF52 SPI libraries?
- 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?
- 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