forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boards: arm: Add RAK4631 Wisblock Core LPWAN board
Add rak4631 board from RAKWireless based on nrf52840 and SX1262. Board Documentation is completed Signed-off-by: Guillaume Paquet <guillaume.paquet@smile.fr>
- Loading branch information
Showing
12 changed files
with
413 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# RAKWIRELESS RAK4631 selection | ||
|
||
# Copyright (c) 2021 Guillaume Paquet <guillaume.paquet@smile.fr> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_RAK4631_NRF52840 | ||
bool "RAK4631 DK NRF52840" | ||
depends on SOC_NRF52840_QIAA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# RAKWIRELESS RAK4631 Board configuration | ||
|
||
# Copyright (c) 2021 Guillaume Paquet <guillaume.paquet@smile.fr> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if BOARD_RAK4631_NRF52840 | ||
|
||
config BOARD | ||
default "rak4631_nrf52840" | ||
|
||
if USB | ||
|
||
config USB_NRFX | ||
default y | ||
|
||
config USB_DEVICE_STACK | ||
default y | ||
|
||
endif # USB | ||
|
||
config BT_CTLR | ||
default BT | ||
|
||
endif # BOARD_RAK4631_NRF52840 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2021 Guillaume Paquet <guillaume.paquet@smile.fr> | ||
# 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) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
.. _rak4631_nrf52840: | ||
|
||
RAK4631 | ||
####### | ||
|
||
Overview | ||
******** | ||
|
||
RAK4631 is a WisBlock Core module for RAK WisBlock. | ||
It extends the WisBlock series with a powerful | ||
Nordic nRF52840 MCU that supports Bluetooth 5.0 | ||
(Bluetooth Low Energy) and the newest LoRa transceiver | ||
from Semtech, the SX1262. The Semtech SX1262 has compared | ||
to the older SX127x series a lower power consumption at | ||
the same TX power. This makes the RAK4631 an ultra-low | ||
power communication solution. RAK4631 can be comfortably | ||
programmed with ZephyrRTOS. | ||
|
||
.. image:: img/rak4631-front-parts.jpg | ||
:width: 500px | ||
:align: center | ||
:alt: RAK4631-NRF52840 | ||
|
||
Hardware | ||
******** | ||
|
||
To use a RAK4631, you need at least a WisBlock Base | ||
to plug the module in. WisBlock Base is the power | ||
supply for the RAK4631 module and has the | ||
programming/debug interface. | ||
|
||
- nRF52840 ARM Cortex-M4F Processor | ||
- 64 MHz CPU clock | ||
- 1 Micro-AB USB OTG host/device | ||
- Semtech SX1262 low power high range LoRa transceiver | ||
- iPEX connectors for the LORA antenna and BLE antenna. | ||
- Multiple interfaces, I2C, UART, GPIO, ADC | ||
- 2 user LEDs on RAK5005 mother Board | ||
- Powered by either Micro USB, 3.7V rechargeable battery or a 5V Solar Panel Port | ||
|
||
Supported Features | ||
================== | ||
|
||
The rak4631_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 | | ||
+-----------+------------+----------------------+ | ||
| RADIO | on-board | LoRa (SX1262) | | ||
+-----------+------------+----------------------+ | ||
| RTC | on-chip | system clock | | ||
+-----------+------------+----------------------+ | ||
| SPI(M/S) | on-chip | spi | | ||
+-----------+------------+----------------------+ | ||
| UART | on-chip | serial | | ||
+-----------+------------+----------------------+ | ||
| USB | on-chip | usb | | ||
+-----------+------------+----------------------+ | ||
| WDT | on-chip | watchdog | | ||
+-----------+------------+----------------------+ | ||
|
||
The default board configuration can be found in the defconfig file: | ||
|
||
``boards/arm/rak4631_nrf52840/rak4631_nrf52840_defconfig`` | ||
|
||
Connections and IOs | ||
=================== | ||
|
||
LED | ||
--- | ||
|
||
* LED1 (green) = P1.3 | ||
* LED2 (blue) = P1.4 | ||
|
||
Programming and Debugging | ||
************************* | ||
|
||
The RAK4631 board shall be connected to a Segger Embedded Debugger Unit | ||
`J-Link OB <https://www.segger.com/jlink-ob.html>`_. This provides a debug | ||
interface to the NRF52840 chip. You can use JLink to communicate with | ||
the NRF52840. | ||
|
||
Flashing | ||
======== | ||
|
||
#. Download JLink from the Segger `JLink Downloads Page`_. Go to the section | ||
"J-Link Software and Documentation Pack" and install the "J-Link Software | ||
and Documentation pack for Linux". The application JLinkExe needs to be | ||
accessible from your path. | ||
|
||
#. Run your favorite terminal program to listen for output. Under Linux the | ||
terminal should be :code:`/dev/ttyACM0`. For example: | ||
|
||
.. code-block:: console | ||
$ minicom -D /dev/ttyACM0 -o | ||
The -o option tells minicom not to send the modem initialization string. | ||
Connection should be configured as follows: | ||
|
||
- Speed: 115200 | ||
- Data: 8 bits | ||
- Parity: None | ||
- Stop bits: 1 | ||
|
||
#. Connect the RAK4631 board to your host computer using the USB debug port. | ||
Then build and flash the :ref:`hello_world` application. | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/hello_world | ||
:board: rak4631_nrf52840 | ||
:goals: build flash | ||
|
||
You should see "Hello World! rak4631_nrf52840" in your terminal. | ||
|
||
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: rak4631_nrf52840 | ||
:maybe-skip-config: | ||
:goals: debug | ||
|
||
References | ||
********** | ||
|
||
.. target-notes:: | ||
|
||
.. _RAK4631 Product Description: | ||
https://docs.rakwireless.com/Product-Categories/WisBlock/RAK4631/Datasheet/#overview | ||
|
||
.. _JLink Downloads Page: | ||
https://www.segger.com/downloads/jlink |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
/* | ||
* Copyright (c) 2021 Guillaume Paquet <guillaume.paquet@smile.fr> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/dts-v1/; | ||
#include <nordic/nrf52840_qiaa.dtsi> | ||
#include <dt-bindings/lora/sx126x.h> | ||
|
||
/ { | ||
model = "RAKWireless RAK4631 WisBlock LPWAN Module with a Nordic NRF52840 SoC"; | ||
compatible = "nordic,rak4631_nrf52840"; | ||
|
||
chosen { | ||
zephyr,console = &uart1; | ||
zephyr,shell-uart = &uart1; | ||
zephyr,uart-mcumgr = &uart1; | ||
zephyr,bt-mon-uart = &uart1; | ||
zephyr,bt-c2h-uart = &uart1; | ||
zephyr,sram = &sram0; | ||
zephyr,flash = &flash0; | ||
zephyr,code-partition = &slot0_partition; | ||
}; | ||
|
||
leds { | ||
compatible = "gpio-leds"; | ||
blue_led: led_2 { | ||
gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; | ||
label = "Blue LED"; | ||
}; | ||
green_led: led_1 { | ||
gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; | ||
label = "Green LED"; | ||
}; | ||
}; | ||
|
||
/* Declaration of aliases */ | ||
aliases { | ||
led0 = &blue_led; | ||
lora0 = &lora; | ||
}; | ||
}; | ||
|
||
&adc { | ||
status = "okay"; | ||
}; | ||
|
||
&gpiote { | ||
status = "okay"; | ||
}; | ||
|
||
&gpio0 { | ||
status = "okay"; | ||
}; | ||
|
||
&gpio1 { | ||
status = "okay"; | ||
}; | ||
|
||
&uart0 { | ||
compatible = "nordic,nrf-uart"; | ||
status = "okay"; | ||
current-speed = <115200>; | ||
tx-pin = <20>; | ||
rx-pin = <19>; | ||
}; | ||
|
||
&uart1 { | ||
compatible = "nordic,nrf-uarte"; | ||
current-speed = <115200>; | ||
status = "okay"; | ||
tx-pin = <16>; | ||
rx-pin = <15>; | ||
}; | ||
|
||
&i2c0 { | ||
compatible = "nordic,nrf-twi"; | ||
status = "okay"; | ||
sda-gpios = <&gpio0 13 0>; | ||
scl-gpios = <&gpio0 14 0>; | ||
}; | ||
|
||
&i2c1 { | ||
compatible = "nordic,nrf-twi"; | ||
/* Cannot be used together with spi1. */ | ||
/* status = "okay"; */ | ||
sda-gpios = <&gpio0 24 0>; | ||
scl-gpios = <&gpio0 25 0>; | ||
}; | ||
|
||
&spi1 { | ||
compatible = "nordic,nrf-spi"; | ||
status = "okay"; | ||
sck-pin = <43>; | ||
mosi-pin = <44>; | ||
miso-pin = <45>; | ||
cs-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; | ||
|
||
lora: sx1262@0 { | ||
compatible = "semtech,sx1262"; | ||
reg = <0>; | ||
label = "sx1262"; | ||
reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; | ||
busy-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; | ||
tx-enable-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; | ||
rx-enable-gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; | ||
dio1-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; | ||
dio2-tx-enable; | ||
dio3-tcxo-voltage = <SX126X_DIO3_TCXO_3V3>; | ||
tcxo-power-startup-delay-ms = <5>; | ||
spi-max-frequency = <1000000>; | ||
}; | ||
}; | ||
|
||
&qspi { | ||
status = "okay"; | ||
sck-pin = <3>; | ||
io-pins = <30>, <29>, <28>, <2>; | ||
csn-pins = <26>; | ||
}; | ||
|
||
&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>; | ||
}; | ||
}; | ||
}; | ||
|
||
&usbd { | ||
compatible = "nordic,nrf-usbd"; | ||
status = "okay"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
identifier: rak4631_nrf52840 | ||
name: RAK4631-NRF52840 | ||
type: mcu | ||
arch: arm | ||
flash: 1024 | ||
ram: 256 | ||
toolchain: | ||
- zephyr | ||
- gnuarmemb | ||
- xtools | ||
supported: | ||
- adc | ||
- ble | ||
- counter | ||
- gpio | ||
- i2c | ||
- pwm | ||
- usb_cdc | ||
- usb_device | ||
- watchdog |
Oops, something went wrong.