8000 Merge pull request #319 from Beetix/dwm1001-dev · sandeepmistry/arduino-nRF5@9d6b784 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9d6b784

Browse files
authored
Merge pull request #319 from Beetix/dwm1001-dev
Added decaWave DWM1001-DEV board
2 parents 30752ee + 283bf08 commit 9d6b784

File tree

6 files changed

+257
-0
lines changed

6 files changed

+257
-0
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ script:
3838
- buildExampleSketch sandeepmistry:nRF5:bluey 01.Basics Blink
3939
- buildExampleSketch sandeepmistry:nRF5:hackaBLE 01.Basics Blink
4040
- buildExampleSketch sandeepmistry:nRF5:Sinobit 01.Basics BareMinimum
41+
- buildExampleSketch sandeepmistry:nRF5:DWM1001-DEV 01.Basics Blink

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ Become a sponsor and get your logo on our README on Github with a link to your s
9090
* [RedBear Nano 2](https://github.com/redbear/nRF5x#ble-nano-2)
9191
* [Bluey](https://github.com/electronut/ElectronutLabs-bluey)
9292
* [hackaBLE](https://github.com/electronut/ElectronutLabs-hackaBLE)
93+
* [DWM1001-DEV](https://www.decawave.com/product/dwm1001-development-board/)
9394

9495
### nRF51
9596
* [Plain nRF51 MCU](https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF51822)

boards.txt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,3 +912,39 @@ 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=
944+
945+
DWM1001-DEV.menu.softdevice.s132=S132
946+
DWM1001-DEV.menu.softdevice.s132.softdevice=s132
947+
DWM1001-DEV.menu.softdevice.s132.softdeviceversion=2.0.1
948+
DWM1001-DEV.menu.softdevice.s132.upload.maximum_size=409600
949+
DWM1001-DEV.menu.softdevice.s132.build.extra_flags=-DNRF52 -DS132 -DNRF51_S132
950+
DWM1001-DEV.menu.softdevice.s132.build.ldscript=armgcc_s132_nrf52832_xxaa.ld

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: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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 - D8
24+
12,
25+
27,
26+
23,
27+
13,
28+
15,
29+
8,
30+
26,
31+
6,
32+
7,
33+
34+
// A0, A1
35+
4,
36+
3,
37+
38+
// SDA, SCL
39+
29,
40+
28,
41+
42+
// RX, TX
43+
11,
44+
5,
45+
46+
// DWM1000
47+
// SPI SS1, MISO1, MOSI1, SCK1
48+
17,
49+
18,
50+
20,
51+
16,
52+
// RST, IRQ
53+
24,
54+
19,
55+
56+
// ACC IRQ
57+
25,
58+
59+
// LEDS
60+
14,
61+
22,
62+
30,
63+
31,
64+
65+
// BTN
66+
2
67+
68+
};

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 (27u)
36+
#define NUM_DIGITAL_PINS (11u)
37+
#define NUM_ANALOG_INPUTS (2u)
38+
#define NUM_ANALOG_OUTPUTS (0u)
39+
40+
// LEDs
41+
#define PIN_LEDRT (22)
42+
#define PIN_LEDRB (23)
43+
#define PIN_LEDG (24)
44+
#define PIN_LEDB (25)
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 (26)
53+
54+
static const uint8_t BTN = PIN_BUTTON ;
55+
56+
/*
57+
* Analog pins
58+
*/
59+
#define PIN_A0 (9)
60+
#define PIN_A1 (10)
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 (13)
71+
#define PIN_SERIAL_TX (14)
72+
73+
/*
74+
* SPI Interfaces
75+
*/
76+
#define SPI_INTERFACES_COUNT 2
77+
78+
#define PIN_SPI_MISO (8)
79+
#define PIN_SPI_MOSI (7)
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 (15)
88+
#define PIN_SPI1_MISO (16)
89+
#define PIN_SPI1_MOSI (17)
90+
#define PIN_SPI1_SCK (18)
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 (11)
103+
#define PIN_WIRE_SCL (12)
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 (19)
117+
#define PIN_DW_IRQ (20)
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 (21)
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)
0