Skip to content

Commit 9d2ec8d

Browse files
committed
Added DWM1001-DEV board
1 parent d91c5c9 commit 9d2ec8d

File tree

4 files changed

+250
-0
lines changed

4 files changed

+250
-0
lines changed

boards.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,3 +912,32 @@ Sinobit.menu.softdevice.s130.softdeviceversion=2.0.1
912912
Sinobit.menu.softdevice.s130.upload.maximum_size=151552
913913
Sinobit.menu.softdevice.s130.build.extra_flags=-DNRF51 -DS130 -DNRF51_S130
914914
Sinobit.menu.softdevice.s130.build.ldscript=armgcc_s130_nrf51822_xxaa.ld
915+
916+
DWM1001-DEV.name=decaWave DWM1001 Module Development Board
917+
918+
DWM1001-DEV.upload.tool=sandeepmistry:openocd
919+
DWM1001-DEV.upload.protocol=jlink
920+
DWM1001-DEV.upload.target=nrf52
921+
DWM1001-DEV.upload.maximum_size=524288
922+
DWM1001-DEV.upload.setup_command=transport select swd;
923+
DWM1001-DEV.upload.use_1200bps_touch=false
924+
DWM1001-DEV.upload.wait_for_upload_port=false
925+
DWM1001-DEV.upload.native_usb=false
926+
927+
DWM1001-DEV.bootloader.tool=sandeepmistry:openocd
928+
929+
DWM1001-DEV.build.mcu=cortex-m4
930+
DWM1001-DEV.build.f_cpu=16000000
931+
DWM1001-DEV.build.board=DWM1001-DEV
932+
DWM1001-DEV.build.core=nRF5
933+
DWM1001-DEV.build.variant=DWM1001-DEV
934+
DWM1001-DEV.build.variant_system_lib=
935+
DWM1001-DEV.build.extra_flags=-DNRF52
936+
DWM1001-DEV.build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16
937+
DWM1001-DEV.build.ldscript=nrf52_xxaa.ld
938+
939+
DWM1001-DEV.build.lfclk_flags=-DUSE_LFXO
940+
941+
DWM1001-DEV.menu.softdevice.none=None
942+
DWM1001-DEV.menu.softdevice.none.softdevice=none
943+
DWM1001-DEV.menu.softdevice.none.softdeviceversion=

variants/DWM1001-DEV/pins_arduino.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
3+
This library is free software; you can redistribute it and/or
4+
modify it under the terms of the GNU Lesser General Public
5+
License as published by the Free Software Foundation; either
6+
version 2.1 of the License, or (at your option) any later version.
7+
This library is distributed in the hope that it will be useful,
8+
but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10+
See the GNU Lesser General Public License for more details.
11+
You should have received a copy of the GNU Lesser General Public
12+
License along with this library; if not, write to the Free Software
13+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
14+
*/
15+
16+
// API compatibility
17+
#include "variant.h"

variants/DWM1001-DEV/variant.cpp

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/*
2+
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
3+
Copyright (c) 2016 Sandeep Mistry All right reserved.
4+
5+
This library is free software; you can redistribute it and/or
6+
modify it under the terms of the GNU Lesser General Public
7+
License as published by the Free Software Foundation; either
8+
version 2.1 of the License, or (at your option) any later version.
9+
10+
This library is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13+
See the GNU Lesser General Public License for more details.
14+
15+
You should have received a copy of the GNU Lesser General Public
16+
License along with this library; if not, write to the Free Software
17+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18+
*/
19+
20+
#include "variant.h"
21+
22+
const uint32_t g_ADigitalPinMap[] = {
23+
// D0 - D10
24+
1,
25+
0,
26+
12,
27+
27,
28+
23,
29+
13,
30+
15,
31+
8,
32+
26,
33+
6,
34+
7,
35+
36+
// A0, A1
37+
4,
38+
3,
39+
40+
// SDA, SCL
41+
29,
42+
28,
43+
44+
// RX, TX
45+
11,
46+
5,
47+
48+
// DWM1000
49+
// SPI SS1, MISO1, MOSI1, SCK1
50+
17,
51+
18,
52+
20,
53+
16,
54+
// RST, IRQ
55+
24,
56+
19,
57+
58+
// ACC IRQ
59+
25,
60+
61+
// LEDS
62+
14,
63+
22,
64+
30,
65+
31,
66+
67+
// BTN
68+
2
69+
70+
};

variants/DWM1001-DEV/variant.h

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
/*
2+
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
3+
Copyright (c) 2016 Sandeep Mistry All right reserved.
4+
This library is free software; you can redistribute it and/or
5+
modify it under the terms of the GNU Lesser General Public
6+
License as published by the Free Software Foundation; either
7+
version 2.1 of the License, or (at your option) any later version.
8+
This library is distributed in the hope that it will be useful,
9+
but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11+
See the GNU Lesser General Public License for more details.
12+
You should have received a copy of the GNU Lesser General Public
13+
License along with this library; if not, write to the Free Software
14+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
15+
*/
16+
17+
#ifndef _VARIANT_DWM1001-DEV_
18+
#define _VARIANT_DWM1001-DEV_
19+
20+
/** Master clock frequency */
21+
#define VARIANT_MCK (64000000ul)
22+
23+
/*----------------------------------------------------------------------------
24+
* Headers
25+
*----------------------------------------------------------------------------*/
26+
27+
#include "WVariant.h"
28+
29+
#ifdef __cplusplus
30+
extern "C"
31+
{
32+
#endif // __cplusplus
33+
34+
// Number of pins defined in PinDescription array
35+
#define PINS_COUNT (29u)
36+
#define NUM_DIGITAL_PINS (13u)
37+
#define NUM_ANALOG_INPUTS (2u)
38+
#define NUM_ANALOG_OUTPUTS (0u)
39+
40+
// LEDs
41+
#define PIN_LEDRT (24)
42+
#define PIN_LEDRB (25)
43+
#define PIN_LEDG (26)
44+
#define PIN_LEDB (27)
45+
#define LED_BUILTIN PIN_LEDRT
46+
static const uint8_t LED_RED_TOP = PIN_LEDRT ;
47+
static const uint8_t LED_RED_BOT = PIN_LEDRB ;
48+
static const uint8_t LED_GREEN = PIN_LEDG ;
49+
static const uint8_t LED_BLUE = PIN_LEDB ;
50+
51+
// Button
52+
#define PIN_BUTTON (28)
53+
54+
static const uint8_t BTN = PIN_BUTTON ;
55+
56+
/*
57+
* Analog pins
58+
*/
59+
#define PIN_A0 (11)
60+
#define PIN_A1 (15)
61+
62+
static const uint8_t A0 = PIN_A0 ; // AIN2
63+
static const uint8_t A1 = PIN_A1 ; // AIN1
64+
#define ADC_RESOLUTION 14
65+
66+
/*
67+
* Serial interfaces
68+
*/
69+
// Serial
70+
#define PIN_SERIAL_RX (15)
71+
#define PIN_SERIAL_TX (16)
72+
73+
/*
74+
* SPI Interfaces
75+
*/
76+
#define SPI_INTERFACES_COUNT 2
77+
78+
#define PIN_SPI_MISO (10)
79+
#define PIN_SPI_MOSI (9)
80+
#define PIN_SPI_SCK (PIN_A0)
81+
82+
static const uint8_t SS = PIN_A1 ;
83+
static const uint8_t MOSI = PIN_SPI_MOSI ;
84+
static const uint8_t MISO = PIN_SPI_MISO ;
85+
static const uint8_t SCK = PIN_SPI_SCK ;
86+
87+
#define PIN_SPI1_SS (17)
88+
#define PIN_SPI1_MISO (18)
89+
#define PIN_SPI1_MOSI (19)
90+
#define PIN_SPI1_SCK (20)
91+
92+
static const uint8_t SS1 = PIN_SPI1_SS ;
93+
static const uint8_t MOSI1 = PIN_SPI1_MOSI ;
94+
static const uint8_t MISO1 = PIN_SPI1_MISO ;
95+
static const uint8_t SCK1 = PIN_SPI1_SCK ;
96+
97+
/*
98+
* Wire Interfaces
99+
*/
100+
#define WIRE_INTERFACES_COUNT 1
101+
102+
#define PIN_WIRE_SDA (13)
103+
#define PIN_WIRE_SCL (14)
104+
105+
static const uint8_t SDA = PIN_WIRE_SDA;
106+
static const uint8_t SCL = PIN_WIRE_SCL;
107+
108+
/*
109+
* Reset Button at P0.21
110+
*/
111+
#define RESET_PIN 21
112+
113+
/*
114+
* Other DWM1001 internal IOs
115+
*/
116+
#define PIN_DW_RST (21)
117+
#define PIN_DW_IRQ (22)
118+
119+
static const uint8_t DW_RST = PIN_DW_RST;
120+
static const uint8_t DW_IRQ = PIN_DW_IRQ;
121+
122+
#define PIN_ACC_IRQ (23)
123+
124+
static const uint8_t ACC_IRQ = PIN_ACC_IRQ;
125+
126+
#ifdef __cplusplus
127+
}
128+
#endif
129+
130+
/*----------------------------------------------------------------------------
131+
* Arduino objects - C++ only
132+
*----------------------------------------------------------------------------*/
133+
134+
#endif

0 commit comments

Comments
 (0)