Skip to content

Commit f92c0b7

Browse files
committed
updates to the xenon variant file
1 parent 6d5edf0 commit f92c0b7

File tree

3 files changed

+79
-26
lines changed

3 files changed

+79
-26
lines changed

boards.txt

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,3 +207,56 @@ pca10056.menu.debug.l2=Level 2 (Full Debug)
207207
pca10056.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
208208
pca10056.menu.debug.l3=Level 3 (Segger SystemView)
209209
pca10056.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
210+
211+
# ----------------------------------
212+
# Particle Xenon
213+
# ----------------------------------
214+
particle_xenon.name=Particle Xenon
215+
216+
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
217+
particle_xenon.vid.0=0x239A
218+
particle_xenon.pid.0=0x8029
219+
particle_xenon.vid.1=0x239A
220+
particle_xenon.pid.1=0x0029
221+
particle_xenon.vid.2=0x239A
222+
particle_xenon.pid.2=0x002A
223+
particle_xenon.vid.3=0x239A
224+
particle_xenon.pid.3=0x802A
225+
226+
# Upload
227+
particle_xenon.bootloader.tool=bootburn
228+
particle_xenon.upload.tool=nrfutil
229+
particle_xenon.upload.protocol=nrfutil
230+
particle_xenon.upload.use_1200bps_touch=true
231+
particle_xenon.upload.wait_for_upload_port=true
232+
particle_xenon.upload.maximum_size=815104
233+
particle_xenon.upload.maximum_data_size=248832
234+
235+
# Build
236+
particle_xenon.build.mcu=cortex-m4
237+
particle_xenon.build.f_cpu=64000000
238+
particle_xenon.build.board=PARTICLE_XENON
239+
particle_xenon.build.core=nRF5
240+
particle_xenon.build.variant=particle_xenon
241+
particle_xenon.build.usb_manufacturer="Particle Industries"
242+
particle_xenon.build.usb_product="Particle Xenon"
243+
particle_xenon.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
244+
particle_xenon.build.ldscript=nrf52840_s140_v6.ld
245+
particle_xenon.build.vid=0x239A
246+
particle_xenon.build.pid=0x8029
247+
248+
# SofDevice Menu
249+
particle_xenon.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1
250+
particle_xenon.menu.softdevice.s140v6.build.sd_name=s140
251+
particle_xenon.menu.softdevice.s140v6.build.sd_version=6.1.1
252+
particle_xenon.menu.softdevice.s140v6.build.sd_fwid=0x00B6
253+
254+
# Debug Menu
255+
particle_xenon.menu.debug.l0=Level 0 (Release)
256+
particle_xenon.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
257+
particle_xenon.menu.debug.l1=Level 1 (Error Message)
258+
particle_xenon.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
259+
particle_xenon.menu.debug.l2=Level 2 (Full Debug)
260+
particle_xenon.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
261+
particle_xenon.menu.debug.l3=Level 3 (Segger SystemView)
262+
particle_xenon.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3

variants/particle_xenon/variant.cpp

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,30 +27,30 @@
2727
const uint32_t g_ADigitalPinMap[] =
2828
{
2929
// D0 .. D8
30-
26, // P0.26 (SDA)
31-
27, // P0.27 (SCL)
32-
33, // P1.01 (SDA1) (UART1_RTS) (SPI1_SCK) (PWM3)
33-
34, // P1.02 (SCL1) (UART1_CTS) (SPI1_MOSI) (PWM3)
34-
40, // P1.08 (UART2_TX) (SPI1_MISO) (PWM1)
35-
42, // P1.10 (UART2_RX) (PWM1)
36-
43, // P1.11 (UART2_CTS) (PWM1)
37-
44, // P1.12 (PWM0)
38-
35, // P1.03 (UART2_RTS)
30+
_PINNUM(0, 26), // P0.26 (SDA)
31+
_PINNUM(0, 27), // P0.27 (SCL)
32+
_PINNUM(1, 1), // P1.01 (SDA1) (UART1_RTS) (SPI1_SCK) (PWM3)
33+
_PINNUM(1, 2), // P1.02 (SCL1) (UART1_CTS) (SPI1_MOSI) (PWM3)
34+
_PINNUM(1, 8), // P1.08 (UART2_TX) (SPI1_MISO) (PWM1)
35+
_PINNUM(1, 10), // P1.10 (UART2_RX) (PWM1)
36+
_PINNUM(1, 26), // P1.11 (UART2_CTS) (PWM1)
37+
_PINNUM(1, 26), // P1.12 (PWM0)
38+
_PINNUM(1, 26), // P1.03 (UART2_RTS)
3939

4040
// D9 .. D20
41-
6, // P0.06 (UART1_TX)
42-
8, // P0.27 (UART1_RX)
43-
46, // P1.14 (SPI_MISO)
44-
45, // P1.13 (SPI_MOSI)
45-
47, // P1.15 (SPI_SCK)
46-
31, // P0.31 (PWM3) (SPI_SS) (ADC5)
47-
30, // P0.30 (PWM3) (ADC4)
48-
29, // P0.29 (PWM2) (ADC3)
49-
28, // P0.28 (PWM2) (ADC2)
50-
4, // P0.04 (PWM2) (ADC1)
51-
3, // P0.03 (PWM2) (ADC0)
52-
11, // P0.11 (MODE)
53-
18, // P0.18 (RESET)
41+
_PINNUM(0, 6), // P0.06 (UART1_TX)
42+
_PINNUM(0, 8), // P0.08 (UART1_RX)
43+
_PINNUM(1, 14), // P1.14 (SPI_MISO)
44+
_PINNUM(1, 13), // P1.13 (SPI_MOSI)
45+
_PINNUM(1, 15), // P1.15 (SPI_SCK)
46+
_PINNUM(0, 31), // P0.31 (PWM3) (SPI_SS) (ADC5)
47+
_PINNUM(0, 30), // P0.30 (PWM3) (ADC4)
48+
_PINNUM(0, 29), // P0.29 (PWM2) (ADC3)
49+
_PINNUM(0, 28), // P0.28 (PWM2) (ADC2)
50+
_PINNUM(0, 4), // P0.04 (PWM2) (ADC1)
51+
_PINNUM(0, 3), // P0.03 (PWM2) (ADC0)
52+
_PINNUM(0, 11), // P0.11 (MODE)
53+
_PINNUM(0, 18), // P0.18 (RESET)
5454
};
5555

5656
void initVariant()

variants/particle_xenon/variant.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ static const uint8_t A5 = PIN_A5 ;
147147
* Serial interfaces
148148
*/
149149
// Serial
150-
#define PIN_SERIAL_RX PIN_D9
151-
#define PIN_SERIAL_TX PIN_D10
152-
#define PIN_SERIAL2_RX PIN_D5
153-
#define PIN_SERIAL2_TX PIN_D6
150+
#define PIN_SERIAL_RX (10)
151+
#define PIN_SERIAL_TX (9)
152+
#define PIN_SERIAL2_RX (5)
153+
#define PIN_SERIAL2_TX (6)
154154
//#define HAVE_HWSERIAL2 true // TODO: implement UARTE in Uart.cpp
155155

156156
/*

0 commit comments

Comments
 (0)