Skip to content
Daniel King edited this page Oct 25, 2016 · 3 revisions

DW1000

The DW1000 is an ultra-wideband (UWB) radio tranceiver chip designed by DecaWave, and is compliant with the UWB physical layer described in the IEEE 802.15.4-2011 standard. This aim of this project is to implement a driver for the DW1000 written in the SPARK programming language, and to prove the absence of common runtime errors (e.g. buffer overrun, integer overflow, etc...) in the driver code.

Architecture

The DW1000 driver is composed of several Ada packages to compose a layered architecture. The purpose of each package is described below (from the bottom up):

  • The DW1000.BSP package provides access to the SPI interface from the host microprocessor (the SPI master) to the DW1000 tranceiver chip (the SPI slave). It provides the ability for the higher layers to send/receive data to/from the DW1000. It also provides some management procedures to handle interrupt requests (IRQs) from the DW1000 (although the actual IRQ handler is not handled here). The implementation of this package is specific to the specific host processor and board, so it is the responsibility of the user to implement this package when using the driver on a different board.
  • The DW1000.Registers and DW1000.Register_Types packages provide the ability to directly read and write individual registers exposed by the DW1000. The DW1000.Register_Types package defines a record type for each of the DW1000's registers (e.g. DW1000.Register_Types.CHAN_CTRL_Type for the CHAN_CTRL register), and the DW1000.Registers package provides a driver containing procedures to read/write the register (e.g. DW1000.Registers.CHAN_CTRL for the CHAN_CTRL register).
  • The DW1000.Driver package defines driver procedures to perform common operations, such as configuring registers for a specific UWB channel, writing packet data, starting the transmitter/receiver, etc...
  • The DecaDriver package provides a high-level driver using protected objects to perform common configuration and handling of transmitting and receiving messages. It implements the interrupt service routine (ISR) for the DW1000 IRQ. This package can serve as a reference implementation for users who wish to write their own driver to meet their specific requirements.

There are also two utility packages to help the user handle timing within the DW1000 (e.g. timestamping packets), and to assess the quality of received packets:

  • The DW1000.System_Time package defines types to handle the various fine-grained and coarse timestamps used by the DW1000.
  • The DW1000.Reception_Quality package provides functions to estimate the received signal power of frames received by the radio.

Generally, the user application will use the DecaDriver package to use the radio. However, the DecaDriver may not be suitable for all users, depending on their application requirements. Users that require different behaviour for their application can discard the DecaDriver and write their own high-level driver using the DW1000.Driver package, and/or direct control over the DW1000's registers using the DW1000.Registers package.

Clone this wiki locally