Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -477,3 +477,50 @@ PCA1000X.menu.lfclk.lfrc=RC Oscillator
PCA1000X.menu.lfclk.lfrc.build.lfclk_flags=-DUSE_LFRC
PCA1000X.menu.lfclk.lfsynt=Synthesized
PCA1000X.menu.lfclk.lfsynt.build.lfclk_flags=-DUSE_LFSYNT


Arch_BLE.name=Arch BLE

Arch_BLE.vid.0=0x0d28
Arch_BLE.pid.0=0x0204

Arch_BLE.upload.tool=sandeepmistry:openocd
Arch_BLE.upload.interface=cmsisdap
Arch_BLE.upload.target=nrf51
Arch_BLE.upload.maximum_size=262144

Arch_BLE.bootloader.tool=sandeepmistry:openocd

Arch_BLE.build.mcu=cortex-m0
Arch_BLE.build.f_cpu=16000000
Arch_BLE.build.board=ARCH_BLE
Arch_BLE.build.core=nRF5
Arch_BLE.build.variant=Arch_BLE
Arch_BLE.build.variant_system_lib=
Arch_BLE.build.extra_flags=-DNRF51
Arch_BLE.build.float_flags=
Arch_BLE.build.ldscript=nrf51_xxaa.ld

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure it's the xxac variant?

Arch_BLE.menu.softdevice.none=None
Arch_BLE.menu.softdevice.none.softdevice=none

Arch_BLE.menu.softdevice.s110=S110
Arch_BLE.menu.softdevice.s110.softdevice=s110
Arch_BLE.menu.softdevice.s110.softdeviceversion=8.0.0
Arch_BLE.menu.softdevice.s110.upload.maximum_size=151552
Arch_BLE.menu.softdevice.s110.build.extra_flags=-DNRF51 -DS110 -DNRF51_S110
Arch_BLE.menu.softdevice.s110.build.ldscript=armgcc_s110_nrf51822_xxaa.ld

Arch_BLE.menu.softdevice.s130=S130
Arch_BLE.menu.softdevice.s130.softdevice=s130
Arch_BLE.menu.softdevice.s130.softdeviceversion=2.0.1
Arch_BLE.menu.softdevice.s130.upload.maximum_size=151552
Arch_BLE.menu.softdevice.s130.build.extra_flags=-DNRF51 -DS130 -DNRF51_S130
Arch_BLE.menu.softdevice.s130.build.ldscript=armgcc_s130_nrf51822_xxaa.ld

Arch_BLE.menu.lfclk.lfxo=Crystal Oscillator
Arch_BLE.menu.lfclk.lfxo.build.lfclk_flags=-DUSE_LFXO
Arch_BLE.menu.lfclk.lfrc=RC Oscillator
Arch_BLE.menu.lfclk.lfrc.build.lfclk_flags=-DUSE_LFRC
Arch_BLE.menu.lfclk.lfsynt=Synthesized
Arch_BLE.menu.lfclk.lfsynt.build.lfclk_flags=-DUSE_LFSYNT
17 changes: 17 additions & 0 deletions variants/Arch_BLE/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

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

#include "variant.h"

const uint32_t g_ADigitalPinMap[] = {
// D0 - D7
7,
8,
9,
10,
11,
12,
13,
17,

// D8 - D13
18,
23,
24,
25,
28,
29,

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a link to more info on the board? Can you please add it to the read me?

If it's this board, I think the pin outs are incorrect: http://wiki.seeed.cc/Arch_BLE/

Should be 7 - 15, 23 - 29 here.

// A0 - A5
1,
2,
3,
4,
5,
6,

// SDA, SCL
5,
6,

// MISO, SCK, MOSI
28,
29,
25,

// AREF
16,

// ADC6
30
};
99 changes: 99 additions & 0 deletions variants/Arch_BLE/variant.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/*
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
Copyright (c) 2016 Sandeep Mistry All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef _VARIANT_ARCH_BLE_
#define _VARIANT_ARCH_BLE_

/** Master clock frequency */
#ifdef NRF52
#define VARIANT_MCK (64000000ul)
#else
#define VARIANT_MCK (16000000ul)
#endif

/*----------------------------------------------------------------------------
* Headers
*----------------------------------------------------------------------------*/

#include "WVariant.h"

#ifdef __cplusplus
extern "C"
{
#endif // __cplusplus

// Number of pins defined in PinDescription array
#define PINS_COUNT (27u)
#define NUM_DIGITAL_PINS (20u)
#define NUM_ANALOG_INPUTS (7u)
#define NUM_ANALOG_OUTPUTS (0u)

// LEDs
#define PIN_LED (26)
#define LED_BUILTIN PIN_LED

/*
* Analog pins
*/
#define PIN_A0 (14)
#define PIN_A1 (15)
#define PIN_A2 (16)
#define PIN_A3 (17)
#define PIN_A4 (18)
#define PIN_A5 (19)

static const uint8_t A0 = PIN_A0 ;
static const uint8_t A1 = PIN_A1 ;
static const uint8_t A2 = PIN_A2 ;
static const uint8_t A3 = PIN_A3 ;
static const uint8_t A4 = PIN_A4 ;
static const uint8_t A5 = PIN_A5 ;
#define ADC_RESOLUTION 10

/*
* Serial interfaces
*/
// Serial
#define PIN_SERIAL_RX (0)
#define PIN_SERIAL_TX (1)

/*
* SPI Interfaces
*/
#define SPI_INTERFACES_COUNT 1

#define PIN_SPI_MISO (22)
#define PIN_SPI_MOSI (24)
#define PIN_SPI_SCK (23)

static const uint8_t SS = 10 ;
static const uint8_t MOSI = PIN_SPI_MOSI ;
static const uint8_t MISO = PIN_SPI_MISO ;
static const uint8_t SCK = PIN_SPI_SCK ;

/*
* Wire Interfaces
*/
#define WIRE_INTERFACES_COUNT 1

#define PIN_WIRE_SDA (20)
#define PIN_WIRE_SCL (21)

#ifdef __cplusplus
}
#endif

#endif