boards: Add Proteus-III board file

Add a new board file of the Proteus-III radio module

Signed-off-by: Matthias Hauser <Matthias.Hauser@we-online.de>
This commit is contained in:
Matthias Hauser 2022-03-01 13:38:07 +01:00 committed by Carles Cufí
commit e565e67114
11 changed files with 453 additions and 0 deletions

View file

@ -0,0 +1,18 @@
# Proteus-III-EV board configuration
# Copyright (c) 2016 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
if BOARD_WE_PROTEUS3EV_NRF52840
config BOARD_ENABLE_DCDC
bool "DCDC mode"
select SOC_DCDC_NRF52X
default y
config BOARD_ENABLE_DCDC_HV
bool "High Voltage DCDC converter"
select SOC_DCDC_NRF52X_HV
default y
endif # BOARD_WE_PROTEUS3EV_NRF52840

View file

@ -0,0 +1,6 @@
# Copyright (c) 2022 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config BOARD_WE_PROTEUS3EV_NRF52840
bool "we_proteus3ev_nrf52840"
depends on SOC_NRF52840_QIAA

View file

@ -0,0 +1,12 @@
# Copyright (c) 2022 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
if BOARD_WE_PROTEUS3EV_NRF52840
config BOARD
default "we_proteus3ev_nrf52840"
config BT_CTLR
default BT
endif

View file

@ -0,0 +1,10 @@
# Copyright (c) 2022 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
board_runner_args(jlink "--device=nrf52" "--speed=4000")
board_runner_args(pyocd "--target=nrf52840" "--frequency=4000000")
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake)

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 KiB

View file

@ -0,0 +1,165 @@
.. _we_proteus3ev_nrf52840:
Würth Elektronik Proteus-III-EV
###############################
Overview
********
The Proteus-III-EV (evaluation board) hardware provides support
for the Proteus-III radio module that uses the Nordic Semiconductor
nRF52840 ARM Cortex-M4F CPU and the following devices:
* :abbr:`ADC (Analog to Digital Converter)`
* CLOCK
* FLASH
* :abbr:`GPIO (General Purpose Input Output)`
* :abbr:`I2C (Inter-Integrated Circuit)`
* :abbr:`MPU (Memory Protection Unit)`
* :abbr:`NVIC (Nested Vectored Interrupt Controller)`
* :abbr:`PWM (Pulse Width Modulation)`
* RADIO (Bluetooth Low Energy and 802.15.4)
* :abbr:`RTC (nRF RTC System Clock)`
* Segger RTT (RTT Console)
* :abbr:`SPI (Serial Peripheral Interface)`
* :abbr:`UART (Universal asynchronous receiver-transmitter)`
* :abbr:`WDT (Watchdog Timer)`
.. figure:: img/we_proteus3ev_nrf52840.jpg
:width: 2810px
:align: center
:alt: Proteus-III EV
Proteus-III EV (Credit: Würth Elektronik)
More information about the radio module can be found the Würth Elektronik
web page https://www.we-online.com/katalog/de/PROTEUS-III .
Hardware
********
Proteus-III radio module provides only the internal oscillators. The
frequency of the slow clock is 32.768 kHz. The frequency of the main
clock is 32 MHz.
Supported Features
==================
The we_proteus3ev_nrf52840 board configuration supports the following
hardware features:
+-----------+------------+----------------------+
| Interface | Controller | Driver/Component |
+===========+============+======================+
| ADC | on-chip | adc |
+-----------+------------+----------------------+
| CLOCK | on-chip | clock_control |
+-----------+------------+----------------------+
| FLASH | on-chip | flash |
+-----------+------------+----------------------+
| GPIO | on-chip | gpio |
+-----------+------------+----------------------+
| I2C(M) | on-chip | i2c |
+-----------+------------+----------------------+
| MPU | on-chip | arch/arm |
+-----------+------------+----------------------+
| NVIC | on-chip | arch/arm |
+-----------+------------+----------------------+
| PWM | on-chip | pwm |
+-----------+------------+----------------------+
| RADIO | on-chip | Bluetooth, |
| | | ieee802154 |
+-----------+------------+----------------------+
| RTC | on-chip | system clock |
+-----------+------------+----------------------+
| RTT | Segger | console |
+-----------+------------+----------------------+
| SPI(M/S) | on-chip | spi |
+-----------+------------+----------------------+
| UART | on-chip | serial |
+-----------+------------+----------------------+
| WDT | on-chip | watchdog |
+-----------+------------+----------------------+
Other hardware features are not supported by the Zephyr kernel.
Connections and IOs
===================
LED
---
* LED1 = P0.00
* LED2 = P0.01
Push buttons
------------
* BUTTON1 = SW1 = P0.03
Programming and Debugging
*************************
Applications for the ``we_proteus3ev_nrf52840`` board configuration can be
built, flashed, and debugged in the usual way. See
:ref:`build_an_application` and :ref:`application_run` for more details on
building and running.
Flashing
========
Follow the instructions in the :ref:`nordic_segger` page to install
and configure all the necessary software. Further information can be
found in :ref:`nordic_segger_flashing`. Then build and flash
applications as usual (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Here is an example for the :ref:`hello_world` application.
First, run your favorite terminal program to listen for output.
.. code-block:: console
$ minicom -D <tty_device> -b 115200
Replace :code:`<tty_device>` with the port where the board Proteus-III-EV
can be found. For example, under Linux, :code:`/dev/ttyACM0`.
Then build and flash the application in the usual way.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: we_proteus3ev_nrf52840
:goals: build flash
Debugging
=========
Refer to the :ref:`nordic_segger` page to learn about debugging Nordic
boards with a Segger IC.
Testing the LEDs and buttons in the Proteus-III-EV
**************************************************
There are 2 samples that allow you to test that the buttons (switches) and
LEDs on the board are working properly with Zephyr:
.. code-block:: console
samples/basic/blinky
samples/basic/button
You can build and flash the examples to make sure Zephyr is running correctly
on your board. The button and LED definitions can be found in
:zephyr_file:`boards/arm/we_proteus3ev_nrf52840/we_proteus3ev_nrf52840.dts`.
References
**********
.. target-notes::
.. _Proteus-III radio module website: https://www.we-online.com/katalog/de/PROTEUS-III
.. _Nordic Semiconductor Infocenter: https://infocenter.nordicsemi.com
.. _J-Link Software and documentation pack: https://www.segger.com/jlink-software.html
.. _nRF52840 Product Specification: http://infocenter.nordicsemi.com/pdf/nRF52840_PS_v1.0.pdf

View file

@ -0,0 +1,56 @@
&pinctrl {
uart0_default: uart0_default {
group1 {
psels = <NRF_PSEL(UART_TX, 1, 8)>,
<NRF_PSEL(UART_RTS, 0, 11)>;
};
group2 {
psels = <NRF_PSEL(UART_RX, 1, 9)>,
<NRF_PSEL(UART_CTS, 0, 12)>;
bias-pull-up;
};
};
uart0_sleep: uart0_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 1, 8)>,
<NRF_PSEL(UART_RX, 1, 9)>,
<NRF_PSEL(UART_RTS, 0, 11)>,
<NRF_PSEL(UART_CTS, 0, 12)>;
low-power-enable;
};
};
i2c0_default: i2c0_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 1, 9)>,
<NRF_PSEL(TWIM_SCL, 1, 8)>;
};
};
i2c0_sleep: i2c0_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 1, 9)>,
<NRF_PSEL(TWIM_SCL, 1, 8)>;
low-power-enable;
};
};
spi0_default: spi0_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 12)>,
<NRF_PSEL(SPIM_MOSI, 1, 8)>,
<NRF_PSEL(SPIM_MISO, 1, 9)>;
};
};
spi0_sleep: spi0_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 12)>,
<NRF_PSEL(SPIM_MOSI, 1, 8)>,
<NRF_PSEL(SPIM_MISO, 1, 9)>;
low-power-enable;
};
};
};

View file

@ -0,0 +1,133 @@
/* Copyright (c) 2022 Nordic Semiconductor ASA */
/* SPDX-License-Identifier: Apache-2.0 */
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "we_proteus3ev_nrf52840-pinctrl.dtsi"
/ {
model = "we_proteus3ev_nrf52840";
compatible = "we,we-proteus3ev-nrf52840";
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
};
leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
label = "LED 0";
};
led1: led_1 {
gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
label = "LED 1";
};
};
buttons {
compatible = "gpio-keys";
button0: button_0 {
gpios = <&gpio0 3 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "Wake-up";
};
};
/* These aliases are provided for compatibility with samples */
aliases {
led0 = &led0;
led1 = &led1;
sw0 = &button0;
bootloader-led0 = &led0;
};
};
&adc {
status = "okay";
};
&gpiote {
status = "okay";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&uart0 {
compatible = "nordic,nrf-uarte";
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
};
&i2c0 {
compatible = "nordic,nrf-twi";
/* Cannot be used together with spi1. */
/* status = "okay"; */
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
};
&spi0 {
compatible = "nordic,nrf-spi";
/* Cannot be used together with i2c0. */
/* status = "okay"; */
pinctrl-0 = <&spi0_default>;
pinctrl-1 = <&spi0_sleep>;
pinctrl-names = "default", "sleep";
};
&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 0x00067000>;
};
slot1_partition: partition@73000 {
label = "image-1";
reg = <0x00073000 0x00067000>;
};
scratch_partition: partition@da000 {
label = "image-scratch";
reg = <0x000da000 0x0001e000>;
};
/*
* The flash starting at 0x000f8000 and ending at
* 0x000fffff is reserved for use by the application.
*/
/*
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@f8000 {
label = "storage";
reg = <0x000f8000 0x00008000>;
};
};
};

View file

@ -0,0 +1,19 @@
# Copyright (c) 2022 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
identifier: we_proteus3ev_nrf52840
name: we_proteus3ev_nrf52840
type: mcu
arch: arm
ram: 256
flash: 1024
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- adc
- ble
- gpio
- i2c
- spi

View file

@ -0,0 +1,33 @@
# Copyright (c) 2022 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_WE_PROTEUS3EV_NRF52840=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# Enable RTT
CONFIG_USE_SEGGER_RTT=y
# enable GPIO
CONFIG_GPIO=y
# enable uart driver
CONFIG_SERIAL=y
# enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
# additional board options
CONFIG_GPIO_AS_PINRESET=y
# Use internal oscillator
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_PINCTRL=y

View file

@ -62,6 +62,7 @@
defined(CONFIG_BOARD_UBX_EVKNINAB3_NRF52840) || \
defined(CONFIG_BOARD_UBX_EVKNINAB4_NRF52833) || \
defined(CONFIG_BOARD_WE_PROTEUS2EV_NRF52832) || \
defined(CONFIG_BOARD_WE_PROTEUS3EV_NRF52840) || \
defined(CONFIG_BOARD_BT610)
#include <hal/nrf_saadc.h>