DWM1001 Firmware User Guide
DWM1001 Firmware User Guide
DWM1001 Firmware User Guide
User Guide
Based on DWM1001-DEV board
Version 1.3
TABLE OF CONTENTS
DISCLAIMER ............................................................................................................................ 5
1 INTRODUCTION ..................................................................................................................... 8
1.1 OVERVIEW ................................................................................................................................... 8
1.2 WHAT’S INCLUDED IN THE FIRMWARE RELEASE................................................................................... 8
2 FIRMWARE OVERVIEW .......................................................................................................... 9
2.1 HIGH-LEVEL ARCHITECTURE ............................................................................................................ 9
2.2 OVERVIEW OF THE PANS LIBRARY ................................................................................................. 10
2.3 COMPONENTS AND OPERATIONS OF THE PANS LIBRARY.................................................................... 11
2.3.1 SoftDevice and BLE driver................................................................................................ 11
2.3.2 eCos RTOS and BSP .......................................................................................................... 11
2.3.3 DW1000 driver ................................................................................................................ 11
2.3.4 Stationary indication ....................................................................................................... 11
2.3.5 PANS Network operation................................................................................................. 11
2.3.6 Commissioning ................................................................................................................ 11
2.3.7 RTLS Management .......................................................................................................... 12
2.3.8 TWR solver / Location Engine .......................................................................................... 12
3 FIRMWARE TOOL CHAIN ...................................................................................................... 13
3.1 TOOL CHAIN OVERVIEW ............................................................................................................... 13
3.2 CONTENT IN THE TOOL CHAIN ........................................................................................................ 13
3.2.1 Hardware part of toolchain ............................................................................................. 14
3.2.2 Software part of toolchain .............................................................................................. 14
3.2.3 Example application package for DWM1001 .................................................................. 15
3.3 GUIDES TO FLASH THE DWM1001 WITH FACTORY IMAGE ................................................................. 15
4 USER APPLICATION EXAMPLES ............................................................................................ 17
4.1 OVERVIEW ................................................................................................................................. 17
4.2 “C CODE API” USER APPLICATION EXAMPLE..................................................................................... 17
4.2.1 Firmware image partitioning .......................................................................................... 17
4.2.2 Compiling/debugging user application in the firmware ................................................. 18
4.3 UART APPLICATIONS EXAMPLE...................................................................................................... 23
4.3.1 UART connection ............................................................................................................. 23
4.3.2 UART examples................................................................................................................ 24
4.4 SPI APPLICATIONS EXAMPLE .......................................................................................................... 26
4.4.1 SPI connection ................................................................................................................. 26
4.4.2 SPI example ..................................................................................................................... 27
5 REFERENCES ........................................................................................................................ 28
6 DOCUMENT HISTORY .......................................................................................................... 29
6.1 REVISION HISTORY ...................................................................................................................... 29
7 CHANGE LOG....................................................................................................................... 30
8 FURTHER INFORMATION ..................................................................................................... 31
LIST OF TABLES
LIST OF FIGURES
DOCUMENT INFORMATION
Disclaimer
Decawave reserves the right to change product specifications without notice. As far as possible changes to
functionality and specifications will be issued in product specific errata sheets or in new versions of this
document. Customers are advised to check the Decawave website for the most recent updates on this
product
Decawave products are not authorized for use in safety-critical applications (such as life support) where a
failure of the Decawave product would reasonably be expected to cause severe personal injury or death.
Decawave customers using or selling Decawave products in such a manner do so entirely at their own risk
and agree to fully indemnify Decawave and its representatives against any damages arising out of the use of
Decawave products in such safety-critical applications.
Precaution should be used when handling the device in order to prevent permanent damage
DISCLAIMER
(1) This Disclaimer applies to the software provided by Decawave Ltd. (“Decawave”) in
support of its DWM1001 module product (“Module”) all as set out at clause 3 herein
(“Decawave Software”).
(3) Decawave Software consists of the following components (a) to (d) inclusive:
(d) Example Host API functions, also designed to run on a Raspberry Pi, which
show how to drive the Module from an external host microprocessor.
(4) The following third party components are used by Decawave Software and are
incorporated in the Firmware or included in the Software Bundle as the case may be: -
(a) The PANS software incorporates the Nordic SoftDevice S132-SD-v3 version
3.0.0 (production) which is included in the Firmware and is also included in the
Software Bundle;
(b) The PANS software uses the eCos RTOS which is included in the Software
Bundle. The eCos RTOS is provided under the terms of an open source licence
which may be found at: http://ecos.sourceware.org/license-overview.html;
(c) The PANS software uses an open source CRC-32 function from FreeBSD which
is included in the Software Bundle. This CRC-32 function is provided under the
terms of the BSD licence which may be found at:
https://github.com/freebsd/freebsd/blob/386ddae58459341ec56760470780581
4a2128a57/COPYRIGHT;
© Decawave 2017 SW-DWM1001-Firmware-User-Guide-1.3 Page 5
DWM1001 Firmware User Guide
(d) The Decawave DRTLS Manager application uses open source software which
is provided as source code in the Software Bundle. This open source software
is provided under the terms of the Apache Licence v2.0 which may be found at
http://www.apache.org/licenses/LICENSE-2.0;
(e) The Decawave DRTLS Gateway Application uses the following third party
components: -
(i) The Linux Kernel which is provided as source code in the Software
Bundle. The Linux Kernel is provided under the terms of the GPLv2
licence which may be found at: https://www.gnu.org/licenses/old-
licenses/gpl-2.0.en.html and as such the DWM1001 driver component
of the DRTLS Gateway Application is provided under the same license
terms;
(ii) The three.js JavaScript library, the downloadable version of which is
available here https://threejs.org/, is provided under the terms of the MIT
Licence which may be found at https://opensource.org/licenses/MIT.
Items (a), (b), (c), (d) and (e) in this section 4 are collectively referred to as the “Third
Party Software”
(5) Decawave Software incorporates source code licensed to Decawave by Leaps s.r.o., a
supplier to Decawave, which is included in the Firmware and the Software Bundle in
binary and/or source code forms as the case may be, under the terms of a license
agreement entered into between Decawave and Leaps s.r.o.
(6) Decawave hereby grants you a free, non-exclusive, non-transferable, worldwide license
without the right to sub-license to design, make, have made, market, sell, have sold or
otherwise dispose of products incorporating Decawave Software, to modify Decawave
Software or incorporate Decawave Software in other software and to design, make,
have made, market, sell, have sold or otherwise dispose of products incorporating such
modified or incorporated software PROVIDED ALWAYS that the use by you of Third
Party Software as supplied by Decawave is subject to the terms and conditions of the
respective license agreements as set out at clause 4 herein AND PROVIDED ALWAYS
that Decawave Software is used only in systems and products based on Decawave
semiconductor products. NO OTHER LICENSE, EXPRESS OR IMPLIED, BY
ESTOPPEL OR OTHERWISE TO ANY OTHER DECAWAVE INTELLECTUAL
PROPERTY RIGHT, AND NO LICENSE TO ANY THIRD PARTY TECHNOLOGY
OR INTELLECTUAL PROPERTY RIGHT, IS GRANTED HEREIN, including but
not limited to any patent right, copyright, mask work right, or other intellectual property
right relating to any combination, machine, or process in which Decawave
semiconductor products or Decawave Software are used.
(8) Decawave Software is solely intended to assist you in developing systems that
incorporate Decawave semiconductor products. You understand and agree that you
remain responsible for using your independent analysis, evaluation and judgment in
designing your systems and products. THE DECISION TO USE DECAWAVE
SOFTWARE IN WHOLE OR IN PART IN YOUR SYSTEMS AND PRODUCTS
RESTS ENTIRELY WITH YOU AND DECAWAVE ACCEPTS NO LIABILTY
WHATSOEVER FOR SUCH DECISION.
(10) DECAWAVE SHALL NOT BE LIABLE FOR AND SHALL NOT DEFEND OR
INDEMNIFY YOU AGAINST ANY THIRD PARTY INFRINGEMENT CLAIM
THAT RELATES TO OR IS BASED ON DECAWAVE SOFTWARE OR THE USE
OF DECAWAVE SOFTWARE. IN NO EVENT SHALL DECAWAVE BE LIABLE
FOR ANY ACTUAL, SPECIAL, INCIDENTAL, CONSEQUENTIAL OR
INDIRECT DAMAGES, HOWEVER CAUSED, INCLUDING WITHOUT
LIMITATION TO THE GENERALITY OF THE FOREGOING, LOSS OF
ANTICIPATED PROFITS, GOODWILL, REPUTATION, BUSINESS RECEIPTS
OR CONTRACTS, COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION), LOSSES OR EXPENSES RESULTING FROM THIRD PARTY
CLAIMS. THESE LIMITATIONS WILL APPLY REGARDLESS OF THE FORM
OF ACTION, WHETHER UNDER STATUTE, IN CONTRACT OR TORT
INCLUDING NEGLIGENCE OR ANY OTHER FORM OF ACTION AND
WHETHER OR NOT DECAWAVE HAS BEEN ADVISED OF THE POSSIBILITY
OF SUCH DAMAGES, ARISING IN ANY WAY OUT OF DECAWAVE
SOFTWARE OR THE USE OF DECAWAVE SOFTWARE.
(11) You acknowledge and agree that you are solely responsible for compliance with all
legal, regulatory and safety-related requirements concerning your products, and any use
of Decawave Software in your applications, notwithstanding any applications-related
information or support that may be provided by Decawave.
(12) Decawave reserves the right to make corrections, enhancements, improvements and
other changes to its software, including Decawave Software, at any time.
Copyright (c) 15 November 2017 by Decawave Limited. All rights reserved. All trademarks
are the property of their respective owners
1 INTRODUCTION
1.1 Overview
The development of real-time positioning network using UWB technology is not a trivial
project. The intention of DWM1001 is to simplify the development of UWB RTLS by
providing a complete solution in a single module.
The DWM1001 module comes pre-loaded with embedded firmware which provides two-way
ranging (TWR) real time location system (RTLS) functionality and networking. The module
can be configured and controlled via its API, which can be accessed through a number of
different interfaces allowing flexibility to the product designer. The details of the API are
described in document [2]. Additionally, Decawave also provides the module firmware in the
form of libraries and source code along with a build environment so that user can customise
the operation and/or add their own functions.
This document describes what is included in the DWM1001 firmware and how these various
elements cooperate together, and explains how users can add their own customisations.
The aim of this user guide is to help the users with their development based on the
DWM1001-DEV board. After reading this guide developers should be able to compile, build
and run the DWM1001 firmware, including custom modifications.
2 FIRMWARE OVERVIEW
2.1 High-Level Architecture
The firmware embedded in the DWM1001 module basically provides two types of functions:
the PANS API and the PANS library which provides lower level functions. The PANS API,
includes the Generic API, (these include different API sets for different interfaces and the
corresponding parser, which acts as the translator between the user APIs (C, UART, SPI
and BLE) and the PANS library). Figure 1 shows the architecture and components of the
DWM1001 firmware.
As can be seen in Figure 1, apart from using the DWM1001 module itself, the DWM1001
module can be physically connected to external controlling hardware, either wired or
wirelessly over Bluetooth radio. The PANS API provides the users with four sets of API to
call the PANS library functions through different interfaces:
• SPI: using a host device (e.g. PC) to communicate with the DWM1001 module using
TLV (Type-Length-Value format, detailed in [2]) format requests and responses
through SPI bus, for configuration and data transmission.
• UART: using a host device (e.g. PC) to communicate the DWM1001 module through
UART bus, for configuration and data transmission. Two modes of communications
© Decawave 2017 SW-DWM1001-Firmware-User-Guide-1.3 Page 9
DWM1001 Firmware User Guide
are provided over the UART interface: UART Generic mode using TLV format
requests and responses; and UART Shell mode using terminal prompt commands.
• BLE: using a Bluetooth Low Energy (BLE) device (e.g. Android tablet) to control and
configure through Bluetooth radio.
All these API sets provide the same set of generic functions calls, namely the Generic API.
The Generic API Parser acts as the translator between the four API sets and the Generic
API. When an API command is called from any of the above API Interfaces, the command
goes through the Generic API Parser which translates the API command into Generic API
function calls. If the API command needs a return message, the DWM1001 responds
through the same interface.
The use of C code, UART and SPI APIs are detailed with simple examples in Section 4.
More detailed information is provided in the API document [2].
Note1: The external interfaces, including the UART, the SPI and the BLE, are used by the
external APIs in the PANS library for Host connection. The on-board user application
through C code API cannot make use of the external interfaces due to compatibility reasons.
Note2: Decawave does not provide the library source code, or support any use of the PANS
library except through the PANS API which is described in the API Document [2]
Figure 2 illustrates the architecture of the PANS Library in detail. From bottom up the main
components are the SoftDevice and the BLE Protocol stack from Nordic Semiconductor,
eCos RTOS system with embedded drivers of the components, IoT layer protocols and the
applications layer. Section 2.3 gives a brief introduction to each of the components in the
library and the operations on the application layer.
The PANS library includes a few firmware components to drive the DWM1001 module.
Some operations are implemented based on these components to perform the positioning
and networking function.
SoftDevice is a Nordic Semiconductor feature-rich library for BLE. The SoftDevice employed
on the DWM1001 is the S132, a concurrent multi-link SoftDevice for Central, Peripheral,
Broadcaster and Observer roles in BLE applications. The BLE driver / library is included in
the S132 SoftDevice, providing the DWM001 with BLE features to create complex network
topologies, communication and firmware update over-the-air [1].
eCos RTOS is a free open source real-time operating system. The eCos system provides
very good run-time performance and the board support package (BSP) for the DWM1001
hardware platform. It includes all the necessary drivers for the module components (i.e.
accelerometer, BLE & DW1000).
Decawave’s DW1000 API driver. For details please see DW1000 Software API Guide [2].
The PANS networking stack, allows discovery, joining and leaving. The UWB frames are
sent according to 802.15.4 standard frame formats. The MAC layer functionality
implemented on the DWM1001 module, as described in DWM1001 System Overview
document [3], controls the mechanism for joining, leaving, installation, commissioning of
nodes and associated two-way ranging protocol and data transfer. A number of different use
cases e.g. follow-me, large-scale asset-tracking, navigation, home network are supported.
2.3.6 Commissioning
The TWR solver / Location Engine in the tags calculates tag’s x, y and z coordinates is
implemented on the DWM1001 module. TWR results between the tag and the relative
anchors are sent to the solver for the calculation of tag’s position. The TWR results are
accessible through the APIs. The internal location engine can be disable and user
customised location calculation performed instead, e.g. adding extra filtering of change
LE/solver algorithms.
The Virtual Box image is now deprecated and the recommended methodology for firmware
development is to use Segger Embedded Studio.
Segger Embedded Studio is ideal for DWM1001 development as it offers a free commercial
use license for the nrf51-52 Nordic Semiconductors MCU.
https://www.segger.com/news/segger-embedded-studio-ide-now-free-for-nordic-sdk-users/
The tool chain can be used for developing a new application with added functionalities which
will reside in the DWM1001 module and will run on top of the PANS library and the main
module functionality.
The figure 3 shows the tool chain used in the DWM1001 firmware development.
The GNU ARM Embedded Toolchain (arm-none-eabi-gcc version 5.4.1 for cross-
compatibility) and Segger Embedded Studio (SES) must be installed by user.
The distributed DWM1001 on-board package contains the user app source files and the
libraries needed to compile and build the DWM1001 user firmware. A SES project is also
provided for each example.
In order to perform user application development for dwm1001, the following software must
be downloaded and installed on the windows computer. We recommend to use the default
installation path.
For cross-compatibility with the compiled PANS library, please ensure the version of the
GNU ARM Embedded Toolchain corresponds to 5.4 2016q3 - Figure 4
The DWM1001 on-board package is provided for download on Decawave website [5].
Refer to the Figure 5 for the detailed content of the DWM1001 on-board package.
Its main components are the DWM1001 PANS library, the firmware binaries such as NRF
softdevice and bootloader, and the user application examples.
In DWM1001 firmware, the eCos library and other third-party software constitute the PANS
library as introduced in Section 2.2. These source files are not provided in the on-board
package.
The nordic semiconductor SDK for nrf52832 is also provided as users may need it for
application development. Note that the sdk version used within PANS is: SDK v 12.1.0
DWM1001 comes with pre-flashed factory image of firmware. This image is provided in the
DWM1001 on-board package: /dwm/recovery/DWM1001_PANS_R2.0.hex. The necessary
steps to flash the factory image on the DWM1001-DEV board are described below.
The J-Flash Light tool can be used to flash the factory image through the DWM1001-DEV
over a few different platforms.
1) Connect the module with a micro USB data cable, shown in Figure 6.
The LEDs on the boards should be active once the flash update completes.
As illustrated in Figure 1, DWM1001 provides many ways to use its API functions. Examples
that show the use of the APIs are listed in this section. In C code, UART Shell, UART
Generic, and SPI, examples of getting the location of the node through the API are
presented. The API document [2] provides more detailed information.
A tool to open serial port between host device and the DWM1001 module over UART is
needed in the firmware development. In Windows, PuTTY can be used; in Linux with a
Raspberry Pi for example, minicom can be used. The UART baud rate on the DWM1001
module is 115200 bps and the configuration is 8N1.
“C code API” example is an application, which is running as part of the on-board firmware,
utilizing a system resources of built-in to the module Cortex M4F microcontroller. The
application is running as a thread application in multi-thread environment, driving by included
to the PANS library eCos real-time operation system.
The flash size of the MCU (nRF52832) used on the DWM1001 module is 512KB from
address 0 to 0x80000. The partitioning of the flash is illustrated as in Figure 7.
The DWM1001 firmware includes the following parts: Nordic S132 Softdevice, Bootloader,
Environment, FW1 and FW2:
• Softdevice, of size 124KB starting from address 0, provides Bluetooth low energy
central and peripheral protocol stack solution.
• Environment, of size 8KB start from address 0x20000, is a flash section reserved for
the firmware to store user configuration information. Doing power off/on, reset or
firmware re-flash will not clear the Environment section in the flash. To clear the
© Decawave 2017 SW-DWM1001-Firmware-User-Guide-1.3 Page 17
DWM1001 Firmware User Guide
• FW1, of size 136KB starting from address 0x22000, is a piece of firmware for the
over-the-air (OTA) firmware update.
• FW2, size of up to 240KB starting from address 0x44000, is the firmware image that
includes the full PANS library and the c code user application, where the user
application is acting as an independent thread in the firmware and can occupy up to
3KB RAM and 60KB Flash. When rebuilding/reflashing the user application firmware,
the whole FW2 is being operated.
To add user customized features, the user customized code needs to be added to the
application files and the whole project needs to be re-built. A simple example of making a C
code user application is given in examples/dwm-simple/dwm-simple.c. The dwm-simple
example can be edited, compiled and debugged with Segger Embedded Studio.
PANS was initially developed and compiled GNU ARM Embedded Toolchain 5.4 2016q3.
It is required to use the exact same version to avoid any retro-compatibility issues.
The first step consists in setting the compiler tool chain to the external GCC compiler
installed previously as per section 3.2.2.
1. Right click on the solution name in the project item section, on the left of the main
SES window. The solution name is at the top of the project structure: dwm-simple.
See Figure 9.
3. Set the variable “Tool Chain Directory” to the path of the bin directory of the GNU
Arm Embedded Toolchain previously installed. The Figure 10 shows the setting for
the default install path.
Figure 10: SES - Configuration of GNU ARM Embedded Toolchain install path
4.2.2.2 Segger Embedded Studio: Build and flash the user application
In order to build the project, open the “build” menu from the SES menu bar and click on
“build dwm-simple” or press “F7”. The log for the build is displayed in the output windows. If
the build is successful, the target mcu memory map is also displayed as information, with the
occupied and remaining amount of flash/RAM memory. See Figure 11.
The “dwm-simple” example can easily be customized and recompiled by the user. Follow the
instructions below to perform an initial PANS customization.
Note: printf will send the message to through UART interface when Shell mode is enabled.
Save.
Build the project and eliminate errors.
This change intends to read the position information in the device and print the message on
the terminal. A system timer is added in the end of the message to indicate the message
time.
© Decawave 2017 SW-DWM1001-Firmware-User-Guide-1.3 Page 20
DWM1001 Firmware User Guide
The compiled example can be flashed on the target device directly from SES. Plug the
DWM1001-Dev device over USB to the computer, and click on “target” from the menu bar.
The option “Download dwm-simple” can be used to load the example.
Please note that SES is only compiling and producing an image corresponding to FW2. If
the user wishes to flash the full PANS library on a blank DWM1001 device, then the
softdevice, bootloader and FW1 will have to be flashed before FW2 as per described in
section 4.1.
In order to simplify this task and generate a unique hex file, a batch script is provided in the
/utilities directory.
Open the generate_example_hex.bat file with a text editor and alter the following fields
depending on the project you are currently modifying and compiling.
SET example_name="dwm-simple"
SET fw2_path="..\examples\dwm-simple\Output\linker\dwm-
simple_fw2.bin"
Save the file and execute the generate_example_hex file by double clicking on it.
A new image file combining the softdevice, bootloader, FW1 and customized FW2 will be
created:
/dwm-simple/Output/dwm1001_dwm-simple.hex.
This new file can be flashed using J-Lite as explained in section Error! Reference source n
ot found.
SES also supports debugging. In order to start the debugging mode, click on “Debug” from
the menu bar or press F5.
Note that a DWM1001-Deb must be connected to the computer to start the debugging mode
successfully. The device is automatically flashed with the latest compiled project when
starting debugging.
As presented by Figure 12, SES has the default options and features usually offered by a
debugger. With the center widget, the user can setup break points and run the application
© Decawave 2017 SW-DWM1001-Firmware-User-Guide-1.3 Page 21
DWM1001 Firmware User Guide
through the code. The equivalent assembly program is displayed on left widget.
On the top right widget, note that the default breakpoints list contains the ARM V7M
exceptions.
We recommend to disable the V7M exceptions as they will be automatically triggered within
the compiled library and will interferer with the user application debugging. In order to
disable them, right click on “V7M exception” as shown on Figure 12.
Note1: A few compilation options are provided in the dwm_user_start() function, with
function names of dwm_XXXX_compile(), where XXXX is the component name. Disabling
these functions can disable the corresponding components in the DWM1001 firmware.
Note2: It is possible to use breakpoints to debug the firmware. However, the user has to be
very carefull because the nRF52 softdevice interrupts are of highest priority, and if there is
BLE activity its interrupts will conflict with user interrupt, thus the BLE should either be
disabled or its interrupts masked. Disabling function dwm_ble_compile() can disable the BLE
compilation so as to void BLE operations during debugging. The function can be re-enabled
after debugging.
Note3: SWO debug printf is not supported on the DWM1001 DEV board.
The PANS library provides API functions through UART interface. The connection and
simple examples are introduced here.
The DWM1001 DEV board provides UART access through both the USB connector and the
pins on the external connector. Both accesses are introduced here.
The UART connection can be setup simply through a USB data cable as shown in Figure 6.
To find the device name of the DWM1001 DEV board in the Windows system:
1) Open Device and Printers,
2) Find the device J-Link:
In different Linux systems, the UART devices may show different names.
Other than using USB cable to connect, the external header pins provided on J10 of the
DWM1001 DEV board also provides the UART interface. Table 1 shows the pins needed in
the UART connection.
For Raspberry Pi 3 using header pins connection, the device name is /dev/serial0.
The connection between the DWM1001 DEV board and a Raspberry Pi 3 (model B) is
shown in Figure 15Figure 15.
Note: Pins on J10 of the DWM1001 DEV board are compatible with Raspberry Pi 3
connector J8 header pins 1-26.
UART interface is accessible through two mode, the Shell mode and the Generic mode.
Both Generic mode and Shell mode can be used to communicate with the DWM1001
module through the UART connection. The default mode of the DWM1001 UART is Generic
mode. The two modes are transferrable:
Generic mode to Shell mode: presses “Enter” twice within one second, or input two bytes
[0x0D, 0x0D] within one second.
For more information of the two UART API modes, please refer to DWM1001 API Guide [2].
➢ minicom -D /dev/serial0
When seeing “Device or resource busy”, try multiple times until it works.
If the connection over UART is successful, “Welcome to minicom” message will show on the
terminal. Now hit “Enter” key twice within one second to enter UART shell mode. “dwm>”
should present in the terminal when this is all done.
To run the UART Shell command for dwm_pos_get, type “apg” followed by “Enter” key. The
position of the module in the whole DRTLS will be printed out, see Figure 16. Type “?”
followed by “Enter” key to get help information in UART Shell mode. More information of the
UART Shell commands is introduce in the DWM1001 API Guide [2].
A simple example to make use of the UART Generic API is given in the DWM1001 Host Api
package [4]. The example runs on the Raspberry Pi platform:
1) Download the dwm1001_host_api package onto the Raspberry Pi 3 device.
Navigate to folder examples/ex1_TWR_2Hosts/tag/
2) Use nano editor to edit Makefile:
➢ nano Makefile
3) Change the configuration parameter USE_INTERFACE to use UART interface:
USE_INTERFACE = 0
4) Press “Ctrl + o” and “Enter” to save. Press “Ctrl + x” to exit nano editor.
5) Use “make” command to build the example:
➢ make
6) Run the executable:
➢ ./tag_cfg
7) Check log.txt file for the detail of UART data transmission.
The simple UART Generic mode example project is designed specifically for Raspberry Pi
platform. The source file examples/ex1_TWR_2Hosts/tag/tag_cfg.c can be changed to
add/modify functionalities. All available UART API functions are listed in header file
include\dwm_api.h. More detailed information of the UART Generic mode is introduced in
the DWM1001 API Guide [2].
The code/makefile needs to be changed, to suit other platforms than Raspberry PI.
The DWM1001 module provides APIs over the SPI interface. The connection and a simple
example are introduced here.
To connect to the DWM1001 module over SPI, the SPI pins on external connector J10 on
the DWM1001 DEV board can be used. Table 2 shows the pins needed in the SPI
connection.
Note: the connector J10 on the DWM1001 DEV board is compatible with Raspberry Pi 3
connector J8 header pins 1-26. Pin 4 from J10 provides 5V power from Raspberry Pi to the
DWM1001 DEV board.
A simple example to make use of the SPI API is given in the DWM1001 Host API package
[4]. The example can run on the Raspberry Pi platform:
1) Download the dwm1001_host_api package onto the Raspberry Pi 3 device.
Navigate to folder examples/ex1_TWR_2Hosts/tag/
2) Use nano editor to edit Makefile:
➢ nano Makefile
3) Change the configuration parameter USE_INTERFACE to use SPI interface:
USE_INTERFACE = 1
4) Press “Ctrl + o” and “Enter” to save. Press “Ctrl + x” to exit nano editor.
5) Use “make” command to build the example:
➢ make
6) Run the executable:
➢ ./tag_cfg
7) Check log.txt file for the detail of SPI data transmission.
The simple SPI example project is designed specifically for Raspberry Pi platform. The
source file examples/ex1_TWR_2Hosts/tag/tag_cfg.c can be changed to add/modify
functionalities. All available SPI API functions are listed in header file include\dwm_api.h.
More detailed information of the SPI API is introduced in the DWM1001 API Guide [2].
The code/makefile needs to be changed to suit other platforms than Raspberry PI.
5 REFERENCES
This document refers to the documents listed below. Note that References’ format can be as
the author chooses.
6 DOCUMENT HISTORY
6.1 Revision History
Table 3: Document History
7 CHANGE LOG
Revision 1.1
Revision 1.2
Page Change Description
ALL Update with new logo
8 FURTHER INFORMATION
Decawave develops semiconductors solutions, software, modules, reference designs - that
enable real-time, ultra-accurate, ultra-reliable local area micro-location services.
Decawave’s technology enables an entirely new class of easy to implement, highly secure,
intelligent location functionality and services for IoT and smart consumer products and
applications.
For further information on this or any other Decawave product, please refer to our website
www.decawave.com.