boards: particle_xenon: Add support Xenon
This patch adds support for the Particle Xenon dev board that has a nrf52840 mcu. Signed-off-by: Endre Karlson <endre.karlson@gmail.com>
This commit is contained in:
parent
73956a398e
commit
714ffe623c
11 changed files with 472 additions and 0 deletions
14
boards/arm/particle_xenon/Kconfig
Normal file
14
boards/arm/particle_xenon/Kconfig
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Kconfig - Particle Xenon configuration
|
||||
#
|
||||
# Copyright (c) 2018 Endre Karlson
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if BOARD_PARTICLE_XENON
|
||||
|
||||
config BOARD_ENABLE_DCDC
|
||||
bool "Enable DCDC mode"
|
||||
select SOC_DCDC_NRF52X
|
||||
default y
|
||||
|
||||
endif # BOARD_PARTICLE_XENON
|
9
boards/arm/particle_xenon/Kconfig.board
Normal file
9
boards/arm/particle_xenon/Kconfig.board
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Kconfig - Particle Xenon configuration
|
||||
#
|
||||
# Copyright (c) 2018 Endre Karlson
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_PARTICLE_XENON
|
||||
bool "Particle Xenon Board"
|
||||
depends on SOC_NRF52840_QIAA
|
87
boards/arm/particle_xenon/Kconfig.defconfig
Normal file
87
boards/arm/particle_xenon/Kconfig.defconfig
Normal file
|
@ -0,0 +1,87 @@
|
|||
# Kconfig - Endre Karlson configuration
|
||||
#
|
||||
# Copyright (c) 2018 Endre Karlson
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if BOARD_PARTICLE_XENON
|
||||
|
||||
config BOARD
|
||||
default "particle_xenon"
|
||||
|
||||
config I2C
|
||||
default y
|
||||
|
||||
if I2C
|
||||
|
||||
config I2C_NRFX
|
||||
default y
|
||||
|
||||
if I2C_NRFX
|
||||
|
||||
config I2C_0
|
||||
default y
|
||||
|
||||
config I2C_1
|
||||
default n
|
||||
|
||||
endif #I2C_NRFX
|
||||
|
||||
if I2C_0
|
||||
|
||||
choice I2C_0_NRF_TYPE
|
||||
default I2C_0_NRF_TWIM
|
||||
|
||||
endchoice
|
||||
|
||||
endif # I2C_0
|
||||
|
||||
if I2C_1
|
||||
|
||||
choice I2C_1_NRF_TYPE
|
||||
default I2C_1_NRF_TWIM
|
||||
|
||||
endchoice
|
||||
|
||||
endif # I2C_1
|
||||
|
||||
endif # I2C
|
||||
|
||||
if SPI
|
||||
|
||||
config SPI_NRFX
|
||||
default y
|
||||
|
||||
if SPI_NRFX
|
||||
|
||||
config SPI_0
|
||||
default n
|
||||
|
||||
config SPI_1
|
||||
default y
|
||||
|
||||
config SPI_2
|
||||
default n
|
||||
|
||||
endif # SPI_NRFX
|
||||
|
||||
endif # SPI
|
||||
|
||||
if USB
|
||||
|
||||
config USB_NRF52840
|
||||
default y
|
||||
|
||||
config USB_DEVICE_STACK
|
||||
default y
|
||||
|
||||
endif # USB
|
||||
|
||||
if IEEE802154
|
||||
|
||||
config IEEE802154_NRF5
|
||||
default y
|
||||
|
||||
endif # IEEE802154
|
||||
|
||||
endif # BOARD_PARTICLE_XENON
|
9
boards/arm/particle_xenon/board.cmake
Normal file
9
boards/arm/particle_xenon/board.cmake
Normal file
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# Copyright (c) 2018, Endre Karlson
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
board_runner_args(jlink "--device=nrf52" "--speed=4000")
|
||||
board_runner_args(nrfjprog "--nrf-family=NRF52")
|
||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
BIN
boards/arm/particle_xenon/doc/img/particle_xenon_block.png
Normal file
BIN
boards/arm/particle_xenon/doc/img/particle_xenon_block.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 311 KiB |
Binary file not shown.
After Width: | Height: | Size: 86 KiB |
BIN
boards/arm/particle_xenon/doc/img/particle_xenon_pinout.png
Normal file
BIN
boards/arm/particle_xenon/doc/img/particle_xenon_pinout.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 161 KiB |
149
boards/arm/particle_xenon/doc/particle_xenon.rst
Normal file
149
boards/arm/particle_xenon/doc/particle_xenon.rst
Normal file
|
@ -0,0 +1,149 @@
|
|||
.. _particle_xenon:
|
||||
|
||||
particle xenon
|
||||
##############
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
`particle xenon`_ is a evaluation board based on the Nordic Semiconductor
|
||||
nRF52840 SoC. The board was developed by Particle Industries.
|
||||
The board has a JTAG connector on it to be programmable.
|
||||
|
||||
It is equipped with a onboard LIPO circuit and conforms with the
|
||||
Adafruit Feather formfactor.
|
||||
|
||||
Zephyr applications use the particle xenon board configuration
|
||||
to run on the particle xenon board hardware. It provides
|
||||
support for the Nordic Semiconductor nRF52840 ARM |reg| Cortex |reg|-M4F SoC
|
||||
with an integrated 2.4 GHz transceiver supporting Bluetooth |reg| Low Energy
|
||||
and IEEE |reg| 802.15.4.
|
||||
|
||||
The schematic can be found on the `particle xenon website`_.
|
||||
|
||||
Hardware
|
||||
********
|
||||
|
||||
On the front of the board are RGB-LED, LED and LIPO circuitru.
|
||||
The RGB-LED is controlled by the nRF52840 via GPIO pins.
|
||||
|
||||
.. figure:: img/particle_xenon_block.png
|
||||
:width: 442px
|
||||
:align: center
|
||||
:alt: particle xenon block
|
||||
|
||||
particle xenon block (Credit: PHYTEC)
|
||||
|
||||
.. figure:: img/particle_xenon_pinout.png
|
||||
:width: 442px
|
||||
:align: center
|
||||
:alt: particle xenon pin markings
|
||||
|
||||
particle xenon pinout (Credit: Particle Industries)
|
||||
|
||||
.. figure:: img/particle_xenon_pin_markings.png
|
||||
:width: 442px
|
||||
:align: center
|
||||
:alt: particle xenon pin markings
|
||||
|
||||
particle xenon pin markings (Credit: Particle Industries)
|
||||
|
||||
Power supply
|
||||
============
|
||||
|
||||
The board is optimized for low power applications and supports two
|
||||
power source configurations, battery and micro USB connector.
|
||||
|
||||
It contains circuitry for LIPO usage and can be charged via the USB port.
|
||||
|
||||
Supported Features
|
||||
==================
|
||||
|
||||
The particle_xenon board configuration supports the following
|
||||
hardware features:
|
||||
|
||||
+-----------+------------+----------------------+
|
||||
| Interface | Controller | Driver/Component |
|
||||
+===========+============+======================+
|
||||
| NVIC | on-chip | nested vectored |
|
||||
| | | interrupt controller |
|
||||
+-----------+------------+----------------------+
|
||||
| RTC | on-chip | system clock |
|
||||
+-----------+------------+----------------------+
|
||||
| UART | on-chip | serial port |
|
||||
+-----------+------------+----------------------+
|
||||
| I2C | on-chip | i2c |
|
||||
+-----------+------------+----------------------+
|
||||
| SPI | on-chip | spi |
|
||||
+-----------+------------+----------------------+
|
||||
| GPIO | on-chip | gpio |
|
||||
+-----------+------------+----------------------+
|
||||
| FLASH | on-chip | flash |
|
||||
+-----------+------------+----------------------+
|
||||
| RADIO | on-chip | Bluetooth |
|
||||
+-----------+------------+----------------------+
|
||||
|
||||
Other hardware features are not supported by the Zephyr kernel.
|
||||
|
||||
Connections and IOs
|
||||
===================
|
||||
|
||||
Please see the `particle xenon Website` for the board on github / schematic.
|
||||
|
||||
Adapter LEDs
|
||||
------------
|
||||
|
||||
+-------+-----------------------+--------------------------------+
|
||||
| Name | Type | Usage |
|
||||
+=======+=======================+================================+
|
||||
| P1,14 | green | - |
|
||||
+-------+-----------------------+--------------------------------+
|
||||
| P1,15 | blue | - |
|
||||
+-------+-----------------------+--------------------------------+
|
||||
| P1,13 | red | - |
|
||||
+-------+-----------------------+--------------------------------+
|
||||
|
||||
Programming and Debugging
|
||||
*************************
|
||||
|
||||
Applications for the ``particle_xenon`` board configuration can be
|
||||
built and flashed in the usual way (see :ref:`build_an_application`
|
||||
and :ref:`application_run` for more details).
|
||||
|
||||
Flashing
|
||||
========
|
||||
|
||||
Build and flash an application in the usual way, for example:
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/basic/blinky
|
||||
:board: particle_xenon
|
||||
:goals: build flash
|
||||
|
||||
Debugging
|
||||
=========
|
||||
|
||||
You can debug an application in the usual way. Here is an example for the
|
||||
:ref:`hello_world` application.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: particle_xenon
|
||||
:maybe-skip-config:
|
||||
:goals: debug
|
||||
|
||||
|
||||
Testing the LEDs and buttons
|
||||
****************************
|
||||
|
||||
There are 2 samples that allow you to test that the buttons (switches) and
|
||||
LEDs on the board are working properly with Zephyr:
|
||||
|
||||
* :ref:`blinky-sample`
|
||||
* :ref:`button-sample`
|
||||
|
||||
You can build and flash the examples to make sure Zephyr is running correctly on
|
||||
your board.
|
||||
|
||||
.. _particle xenon Website:
|
||||
https://github.com/particle-iot/xenon
|
154
boards/arm/particle_xenon/particle_xenon.dts
Normal file
154
boards/arm/particle_xenon/particle_xenon.dts
Normal file
|
@ -0,0 +1,154 @@
|
|||
/*
|
||||
* Copyright (c) 2018 Endre Karlson
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf52840_qiaa.dtsi>
|
||||
|
||||
/ {
|
||||
model = "particle xenon";
|
||||
compatible = "particle,particle_xenon", "nordic,nrf52840-qiaa",
|
||||
"nordic,nrf52840";
|
||||
|
||||
chosen {
|
||||
zephyr,console = &uart0;
|
||||
zephyr,uart-mcumgr = &uart0;
|
||||
zephyr,shell-uart = &uart0;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
user_led: led_0 {
|
||||
gpios = <&gpio1 12 0>;
|
||||
label = "User LED";
|
||||
};
|
||||
status_green: led_1 {
|
||||
gpios = <&gpio1 14 0>;
|
||||
label = "Green LED";
|
||||
};
|
||||
status_blue: led_2 {
|
||||
gpios = <&gpio1 15 0>;
|
||||
label = "Blue LED";
|
||||
};
|
||||
status_red: led_3 {
|
||||
gpios = <&gpio1 13 0>;
|
||||
label = "Red LED";
|
||||
};
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
mode_button: button_0 {
|
||||
gpios = <&gpio0 11 GPIO_PUD_PULL_UP>;
|
||||
label = "Mode Button";
|
||||
};
|
||||
|
||||
reset_button: button_1 {
|
||||
gpios = <&gpio0 18 GPIO_PUD_PULL_UP>;
|
||||
label = "Reset Button";
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
led0 = &user_led;
|
||||
led1 = &status_green;
|
||||
led2 = &status_blue;
|
||||
led3 = &status_red;
|
||||
sw0 = &mode_button;
|
||||
sw1 = &reset_button;
|
||||
};
|
||||
};
|
||||
|
||||
&gpiote {
|
||||
status ="ok";
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
status ="ok";
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
status ="ok";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
compatible = "nordic,nrf-uart";
|
||||
current-speed = <115200>;
|
||||
status = "ok";
|
||||
tx-pin = <6>;
|
||||
rx-pin = <8>;
|
||||
rts-pin = <2>;
|
||||
cts-pin = <3>;
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
status = "ok";
|
||||
clock-frequency = <I2C_BITRATE_FAST>;
|
||||
sda-pin = <26>;
|
||||
scl-pin = <27>;
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
status = "ok";
|
||||
clock-frequency = <I2C_BITRATE_FAST>;
|
||||
sda-pin = <33>;
|
||||
scl-pin = <34>;
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "ok";
|
||||
sck-pin = <47>;
|
||||
mosi-pin = <45>;
|
||||
miso-pin = <46>;
|
||||
cs-gpios = <&gpio0 31 0>;
|
||||
};
|
||||
|
||||
&spi1 {
|
||||
status = "ok";
|
||||
sck-pin = <33>;
|
||||
mosi-pin = <34>;
|
||||
miso-pin = <40>;
|
||||
};
|
||||
|
||||
&adc {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&flash0 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
boot_partition: partition@0 {
|
||||
label = "mcuboot";
|
||||
reg = <0x000000000 0x0000C000>;
|
||||
};
|
||||
slot0_partition: partition@c000 {
|
||||
label = "image-0";
|
||||
reg = <0x0000C000 0x000069000>;
|
||||
};
|
||||
slot1_partition: partition@75000 {
|
||||
label = "image-1";
|
||||
reg = <0x00075000 0x000069000>;
|
||||
};
|
||||
scratch_partition: partition@de000 {
|
||||
label = "image-scratch";
|
||||
reg = <0x000de000 0x0001e000>;
|
||||
};
|
||||
|
||||
storage_partition: partition@fc000 {
|
||||
label = "storage";
|
||||
reg = <0x000fc000 0x00004000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&usbd {
|
||||
compatible = "nordic,nrf-usbd";
|
||||
status = "ok";
|
||||
};
|
21
boards/arm/particle_xenon/particle_xenon.yaml
Normal file
21
boards/arm/particle_xenon/particle_xenon.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
#
|
||||
# Copyright (c) 2018, Endre Karlson
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
identifier: particle_xenon
|
||||
name: particle-xenon
|
||||
type: mcu
|
||||
arch: arm
|
||||
ram: 512
|
||||
flash: 1024
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gnuarmemb
|
||||
supported:
|
||||
- i2c
|
||||
- spi
|
||||
- gpio
|
||||
- usb_device
|
||||
- ble
|
||||
- ieee802154
|
29
boards/arm/particle_xenon/particle_xenon_defconfig
Normal file
29
boards/arm/particle_xenon/particle_xenon_defconfig
Normal file
|
@ -0,0 +1,29 @@
|
|||
#
|
||||
# Copyright (c) 2018, Endre Karlson
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
CONFIG_ARM=y
|
||||
CONFIG_SOC_FAMILY_NRF=y
|
||||
CONFIG_SOC_SERIES_NRF52X=y
|
||||
CONFIG_SOC_NRF52840_QIAA=y
|
||||
CONFIG_BOARD_PARTICLE_XENON=y
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
# enable uart driver
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_UART_NRFX=y
|
||||
CONFIG_UART_0_NRF_UART=y
|
||||
|
||||
# enable console
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
|
||||
# additional board options
|
||||
CONFIG_GPIO_AS_PINRESET=y
|
||||
|
||||
# bluetooth
|
||||
CONFIG_BT=y
|
||||
CONFIG_BT_CTLR=y
|
Loading…
Add table
Add a link
Reference in a new issue