Loading...
Searching...
No Matches
dw3000_params.h File Reference

Default configuration for DW3000. More...

Detailed Description

Default configuration for DW3000.

Author
Simon Grund mail@.nosp@m.simo.nosp@m.ngrun.nosp@m.d.de

Definition in file dw3000_params.h.

#include "board.h"
#include "dw3000_conf.h"
+ Include dependency graph for dw3000_params.h:

Go to the source code of this file.

Variables

static const dw3000_params_t dw3000_params = DW3000_PARAMS
 Configuration struct.
 

Set default configuration parameters

These default values correspond to the Qorvo DWM3000EVB Evaluation Shield on top of an nrf52840dk

#define DW3000_PARAM_SPI   SPI_DEV(0)
 SPI device used.
 
#define DW3000_PARAM_SPI_CS   GPIO_PIN(1, 12)
 Chip Select pin for SPI.
 
#define DW3000_PARAM_SPI_MODE   SPI_MODE_0
 Mode that the SPI connection uses.
 
#define DW3000_PARAM_IRQ   GPIO_PIN(1, 10)
 IRQ pin to receive interrupts from the DW3000.
 
#define DW3000_PARAM_RESET   GPIO_PIN(1, 8)
 Pin to reset the DW3000.
 
#define DW3000_PARAM_WAKEUP   GPIO_PIN(1, 11)
 Pin to wakeup the DW3000.
 
#define DW3000_PARAM_SPI_SPEED_FAST   SPI_CLK_10MHZ
 The fast SPI speed.
 
#define DW3000_PARAM_SPI_SPEED_SLOW   SPI_CLK_1MHZ
 The slow (and default) SPI speed.
 
#define DW3000_PARAMS
 Collection of all params.
 

Macro Definition Documentation

◆ DW3000_PARAM_IRQ

#define DW3000_PARAM_IRQ   GPIO_PIN(1, 10)

IRQ pin to receive interrupts from the DW3000.

Definition at line 51 of file dw3000_params.h.

◆ DW3000_PARAM_RESET

#define DW3000_PARAM_RESET   GPIO_PIN(1, 8)

Pin to reset the DW3000.

Definition at line 56 of file dw3000_params.h.

◆ DW3000_PARAM_SPI

#define DW3000_PARAM_SPI   SPI_DEV(0)

SPI device used.

Definition at line 36 of file dw3000_params.h.

◆ DW3000_PARAM_SPI_CS

#define DW3000_PARAM_SPI_CS   GPIO_PIN(1, 12)

Chip Select pin for SPI.

Definition at line 41 of file dw3000_params.h.

◆ DW3000_PARAM_SPI_MODE

#define DW3000_PARAM_SPI_MODE   SPI_MODE_0

Mode that the SPI connection uses.

Definition at line 46 of file dw3000_params.h.

◆ DW3000_PARAM_SPI_SPEED_FAST

#define DW3000_PARAM_SPI_SPEED_FAST   SPI_CLK_10MHZ

The fast SPI speed.

Can be activated after IDLE_RC

Definition at line 70 of file dw3000_params.h.

◆ DW3000_PARAM_SPI_SPEED_SLOW

#define DW3000_PARAM_SPI_SPEED_SLOW   SPI_CLK_1MHZ

The slow (and default) SPI speed.

Definition at line 75 of file dw3000_params.h.

◆ DW3000_PARAM_WAKEUP

#define DW3000_PARAM_WAKEUP   GPIO_PIN(1, 11)

Pin to wakeup the DW3000.

Optional, set to GPIO_UNDEF if unused.

If undefined, the DW3000 will be woken using SPI CS.

Definition at line 65 of file dw3000_params.h.

◆ DW3000_PARAMS

#define DW3000_PARAMS
Value:
{ .spi = DW3000_PARAM_SPI, \
.spi_cs = DW3000_PARAM_SPI_CS, \
.spi_mode = DW3000_PARAM_SPI_MODE, \
.irq = DW3000_PARAM_IRQ, \
.reset = DW3000_PARAM_RESET, \
.wakeup = DW3000_PARAM_WAKEUP, \
.spi_speed_fast = DW3000_PARAM_SPI_SPEED_FAST, \
.spi_speed_slow = DW3000_PARAM_SPI_SPEED_SLOW }
#define DW3000_PARAM_SPI_SPEED_SLOW
The slow (and default) SPI speed.
#define DW3000_PARAM_SPI_CS
Chip Select pin for SPI.
#define DW3000_PARAM_SPI
SPI device used.
#define DW3000_PARAM_IRQ
IRQ pin to receive interrupts from the DW3000.
#define DW3000_PARAM_WAKEUP
Pin to wakeup the DW3000.
#define DW3000_PARAM_RESET
Pin to reset the DW3000.
#define DW3000_PARAM_SPI_MODE
Mode that the SPI connection uses.
#define DW3000_PARAM_SPI_SPEED_FAST
The fast SPI speed.

Collection of all params.

Only one device is allowed.

Definition at line 80 of file dw3000_params.h.

Variable Documentation

◆ dw3000_params

const dw3000_params_t dw3000_params = DW3000_PARAMS
static

Configuration struct.

The patched decadriver by br101 only allows a single device, with the benefit of reducing the code size and the reasoning that typical embedded devices will only ever use one DW3000 radio. Thus only a single params struct is allowed here.

Definition at line 99 of file dw3000_params.h.