-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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 support for Arduino Nicla Sense ME
This commit adds support for the Arduino Nicla Sense ME board. The board functionality has been tested using the samples: - hello_world - philosophers - peripheral_dis - spi_flash Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
- Loading branch information
1 parent
70a1827
commit 834c211
Showing
11 changed files
with
445 additions
and
0 deletions.
There are no files selected for viewing
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 @@ | ||
# Arduino Nicla Sense ME board configuration | ||
|
||
# Copyright (c) 2022 Benjamin Björnsson <benjamin.bjornsson@gmail.com>. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_ARDUINO_NICLA_SENSE_ME | ||
bool "Arduino Nicla Sense ME" | ||
depends on SOC_NRF52832_QFAA |
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,14 @@ | ||
# Arduino Nicla Sense ME board configuration | ||
|
||
# Copyright (c) 2022 Benjamin Björnsson <benjamin.bjornsson@gmail.com>. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if BOARD_ARDUINO_NICLA_SENSE_ME | ||
|
||
config BOARD | ||
default "arduino_nicla_sense_me" | ||
|
||
config BT_CTLR | ||
default BT | ||
|
||
endif # BOARD_ARDUINO_NICLA_SENSE_ME |
86 changes: 86 additions & 0 deletions
86
boards/arm/arduino_nicla_sense_me/arduino_nicla_sense_me-pinctrl.dtsi
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,86 @@ | ||
/* | ||
* Copyright (c) 2022 Benjamin Björnsson <benjamin.bjornsson@gmail.com>. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&pinctrl { | ||
uart0_default: uart0_default { | ||
group1 { | ||
psels = <NRF_PSEL(UART_TX, 0, 20)>, | ||
<NRF_PSEL(UART_RX, 0, 9)>; | ||
}; | ||
}; | ||
|
||
uart0_sleep: uart0_sleep { | ||
group1 { | ||
psels = <NRF_PSEL(UART_TX, 0, 20)>, | ||
<NRF_PSEL(UART_RX, 0, 9)>; | ||
low-power-enable; | ||
}; | ||
}; | ||
|
||
i2c0_default: i2c0_default { | ||
group1 { | ||
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>, | ||
<NRF_PSEL(TWIM_SCL, 0, 16)>; | ||
}; | ||
}; | ||
|
||
i2c0_sleep: i2c0_sleep { | ||
group1 { | ||
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>, | ||
<NRF_PSEL(TWIM_SCL, 0, 16)>; | ||
low-power-enable; | ||
}; | ||
}; | ||
|
||
i2c1_default: i2c1_default { | ||
group1 { | ||
psels = <NRF_PSEL(TWIM_SDA, 0, 22)>, | ||
<NRF_PSEL(TWIM_SCL, 0, 23)>; | ||
}; | ||
}; | ||
|
||
i2c1_sleep: i2c1_sleep { | ||
group1 { | ||
psels = <NRF_PSEL(TWIM_SDA, 0, 22)>, | ||
<NRF_PSEL(TWIM_SCL, 0, 23)>; | ||
low-power-enable; | ||
}; | ||
}; | ||
|
||
spi1_default: spi2_default { | ||
group1 { | ||
psels = <NRF_PSEL(SPIM_SCK, 0, 11)>, | ||
<NRF_PSEL(SPIM_MOSI, 0, 27)>, | ||
<NRF_PSEL(SPIM_MISO, 0, 28)>; | ||
}; | ||
}; | ||
|
||
spi1_sleep: spi2_sleep { | ||
group1 { | ||
psels = <NRF_PSEL(SPIM_SCK, 0, 11)>, | ||
<NRF_PSEL(SPIM_MOSI, 0, 27)>, | ||
<NRF_PSEL(SPIM_MISO, 0, 28)>; | ||
low-power-enable; | ||
}; | ||
}; | ||
|
||
spi2_default: spi2_default { | ||
group1 { | ||
psels = <NRF_PSEL(SPIM_SCK, 0, 3)>, | ||
<NRF_PSEL(SPIM_MOSI, 0, 4)>, | ||
<NRF_PSEL(SPIM_MISO, 0, 5)>; | ||
}; | ||
}; | ||
|
||
spi2_sleep: spi2_sleep { | ||
group1 { | ||
psels = <NRF_PSEL(SPIM_SCK, 0, 3)>, | ||
<NRF_PSEL(SPIM_MOSI, 0, 4)>, | ||
<NRF_PSEL(SPIM_MISO, 0, 5)>; | ||
low-power-enable; | ||
}; | ||
}; | ||
}; |
138 changes: 138 additions & 0 deletions
138
boards/arm/arduino_nicla_sense_me/arduino_nicla_sense_me.dts
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,138 @@ | ||
/* | ||
* Copyright (c) 2022 Benjamin Björnsson <benjamin.bjornsson@gmail.com>. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/dts-v1/; | ||
#include <nordic/nrf52832_qfaa.dtsi> | ||
#include "arduino_nicla_sense_me-pinctrl.dtsi" | ||
|
||
/ { | ||
model = "Arduino Nicla Sense ME"; | ||
compatible = "arduino,arduino_nicla_sense_me"; | ||
|
||
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; | ||
}; | ||
}; | ||
|
||
&adc { | ||
status = "okay"; | ||
}; | ||
|
||
&gpiote { | ||
status = "okay"; | ||
}; | ||
|
||
&gpio0 { | ||
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 in datasheet */ | ||
&i2c0 { | ||
compatible = "nordic,nrf-twim"; | ||
status = "okay"; | ||
pinctrl-0 = <&i2c0_default>; | ||
pinctrl-1 = <&i2c0_sleep>; | ||
pinctrl-names = "default", "sleep"; | ||
}; | ||
|
||
/* I2C1 in datasheet */ | ||
&i2c1 { | ||
compatible = "nordic,nrf-twim"; | ||
/* Cannot be used together with spi1. */ | ||
status = "okay"; | ||
pinctrl-0 = <&i2c1_default>; | ||
pinctrl-1 = <&i2c1_sleep>; | ||
pinctrl-names = "default", "sleep"; | ||
}; | ||
|
||
/* SPI1 in datasheet */ | ||
&spi1 { | ||
compatible = "nordic,nrf-spim"; | ||
/* Cannot be used together with i2c1. */ | ||
/* status = "okay"; */ | ||
pinctrl-0 = <&spi1_default>; | ||
pinctrl-1 = <&spi1_sleep>; | ||
pinctrl-names = "default", "sleep"; | ||
}; | ||
|
||
/* SPI0 in datasheet */ | ||
&spi2 { | ||
compatible = "nordic,nrf-spi"; | ||
status = "okay"; | ||
pinctrl-0 = <&spi2_default>; | ||
pinctrl-1 = <&spi2_sleep>; | ||
pinctrl-names = "default", "sleep"; | ||
cs-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>; | ||
|
||
mx25r1635f@0 { | ||
compatible = "jedec,spi-nor"; | ||
reg = <0>; | ||
spi-max-frequency = <80000000>; | ||
label = "MX25R16"; | ||
jedec-id = [c2 28 15]; | ||
size = <DT_SIZE_M(16)>; | ||
has-dpd; | ||
t-enter-dpd = <10000>; | ||
t-exit-dpd = <35000>; | ||
|
||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
logging_partition: partition@0 { | ||
label = "logging"; | ||
reg = <0x00000000 DT_SIZE_M(16)>; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
&flash0 { | ||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
boot_partition: partition@0 { | ||
label = "sam-ba"; | ||
reg = <0x00000000 0x00010000>; | ||
read-only; | ||
}; | ||
slot0_partition: partition@10000 { | ||
label = "image-0"; | ||
reg = <0x00010000 0x30000>; | ||
}; | ||
slot1_partition: partition@40000 { | ||
label = "image-1"; | ||
reg = <0x00040000 0x30000>; | ||
}; | ||
scratch_partition: partition@70000 { | ||
label = "image-scratch"; | ||
reg = <0x00070000 0xa000>; | ||
}; | ||
storage_partition: partition@7a000 { | ||
label = "storage"; | ||
reg = <0x0007a000 0x00006000>; | ||
}; | ||
}; | ||
}; |
19 changes: 19 additions & 0 deletions
19
boards/arm/arduino_nicla_sense_me/arduino_nicla_sense_me.yaml
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,19 @@ | ||
identifier: arduino_nicla_sense_me | ||
name: Arduino Nicla Sense ME | ||
type: mcu | ||
arch: arm | ||
ram: 64 | ||
flash: 512 | ||
toolchain: | ||
- zephyr | ||
- gnuarmemb | ||
- xtools | ||
supported: | ||
- gpio | ||
- i2c | ||
- spi | ||
- shell | ||
- counter | ||
- nvs | ||
- pwm | ||
- watchdog |
25 changes: 25 additions & 0 deletions
25
boards/arm/arduino_nicla_sense_me/arduino_nicla_sense_me_defconfig
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,25 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
CONFIG_SOC_SERIES_NRF52X=y | ||
CONFIG_SOC_NRF52832_QFAA=y | ||
CONFIG_BOARD_ARDUINO_NICLA_SENSE_ME=y | ||
|
||
# Enable MPU | ||
CONFIG_ARM_MPU=y | ||
CONFIG_HW_STACK_PROTECTION=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 | ||
|
||
# enable pin controller | ||
CONFIG_PINCTRL=y |
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,4 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
board_runner_args(pyocd "--target=nrf52" "--frequency=400000") | ||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+200 KB
boards/arm/arduino_nicla_sense_me/doc/arduino_nicla_sense_me_pinout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.