text stringlengths 9 39.2M | dir stringlengths 25 226 | lang stringclasses 163 values | created_date timestamp[s] | updated_date timestamp[s] | repo_name stringclasses 751 values | repo_full_name stringclasses 752 values | star int64 1.01k 183k | len_tokens int64 1 18.5M |
|---|---|---|---|---|---|---|---|---|
```ini
source [find interface/jlink.cfg]
transport select swd
set CHIPNAME atsamd51p20a
source [find target/atsame5x.cfg]
reset_config srst_only
$_TARGETNAME configure -event gdb-attach {
echo "Debugger attaching: halting execution"
reset halt
}
$_TARGETNAME configure -event gdb-detach {
echo "Debugger detaching: resuming execution"
resume
}
``` | /content/code_sandbox/boards/adafruit/grand_central_m4_express/support/openocd.cfg | ini | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 92 |
```unknown
config BOARD_ADAFRUIT_FEATHER_M0_LORA
select SOC_SAMD21G18A
``` | /content/code_sandbox/boards/adafruit/feather_m0_lora/Kconfig.adafruit_feather_m0_lora | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 24 |
```cmake
#
include(${ZEPHYR_BASE}/boards/common/bossac.board.cmake)
``` | /content/code_sandbox/boards/adafruit/feather_m0_lora/board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 19 |
```yaml
identifier: adafruit_feather_m0_lora
name: Adafruit Feather M0 LoRa
type: mcu
arch: arm
ram: 32
flash: 232
toolchain:
- zephyr
- gnuarmemb
- xtools
vendor: adafruit
``` | /content/code_sandbox/boards/adafruit/feather_m0_lora/adafruit_feather_m0_lora.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 67 |
```cmake
# Suppress "unique_unit_address_if_enabled" to handle the following overlaps:
# - /soc/pinmux@41004400 & /soc/gpio@41004400
# - /soc/pinmux@41004480 & /soc/gpio@41004480
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
``` | /content/code_sandbox/boards/adafruit/feather_m0_lora/pre_dt_board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 74 |
```restructuredtext
.. _adafruit_grand_central_m4_express:
Adafruit Grand Central M4 Express
#################################
Overview
********
The Adafruit Grand Central M4 Express is an ARM development board with the
form factor of an Arduino Mega.
It features 70 GPIO pins, a microSDHC slot and 8MiB of QSPI Flash.
.. figure:: img/adafruit_grand_central_m4_express.webp
:width: 800px
:align: center
:alt: Adafruit Grand Central M4 Express
Adafruit Grand Central M4 Express (Credit: Kattni Rembor / Adafruit)
Hardware
********
- ATSAMD51P20A ARM Cortex-M4F processor at 120 MHz
- 1024 KiB of flash memory and 256 KiB of RAM
- 8 MiB of QSPI flash
- A red user LED
- A RGB "NeoPixel" / WS2812B LED
- A microSDHC slot (connected via SPI)
- Native USB port
Supported Features
==================
The adafruit_grand_central_m4_express board configuration supports the following
hardware features:
+-----------+------------+------------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+==========================================+
| NVIC | on-chip | Nested vector interrupt controller |
+-----------+------------+------------------------------------------+
| SYSTICK | on-chip | SysTick |
+-----------+------------+------------------------------------------+
| WDT | on-chip | Watchdog |
+-----------+------------+------------------------------------------+
| GPIO | on-chip | I/O ports, User LED |
+-----------+------------+------------------------------------------+
| UART | on-chip | Serial ports, Console |
+-----------+------------+------------------------------------------+
| SPI | on-chip | SPI ports, microSDHC slot |
+-----------+------------+------------------------------------------+
| TRNG | on-chip | True Random Number Generator |
+-----------+------------+------------------------------------------+
| RTC | on-chip | Real-Time Counter |
+-----------+------------+------------------------------------------+
| USB | on-chip | USB device |
+-----------+------------+------------------------------------------+
| WDT | on-chip | Watchdog Timer |
+-----------+------------+------------------------------------------+
Other hardware features are not currently supported by Zephyr.
The default configuration can be found in the Kconfig file
:zephyr_file:`boards/adafruit/grand_central_m4_express/adafruit_grand_central_m4_express_defconfig`.
Connections and IOs
===================
The `Adafruit Learning System`_ has detailed information about
the board including `pinouts`_ and the `schematics`_.
System Clock
============
The SAMD51 MCU is configured to use the 32.768 kHz external oscillator
with the on-chip PLL generating the 120 MHz system clock.
Serial Port
===========
The SAMD51 MCU has 8 SERCOM based UARTs. On the Grand Central, SERCOM0 is
the Zephyr console and is available on RX(PB25) and TX(PB24).
SPI Port
========
The SAMD51 MCU has 8 SERCOM based SPIs. On the Grand Central, SERCOM7 has been
set into SPI mode to connect to devices over the SCK(PD09), MOSI(PD08), and MISO(PD11) pins.
Additionally SERCOM2 has been configured as SPI to access the microSDHC card.
I2C Port
========
The SAMD51 MCU has 8 SERCOM based I2Cs. On the Grand Central, SERCOM3 has been
configured as I2C to connect to devices over the SCL(PB21) and SDA(PB20) pins.
USB Device Port
===============
The SAMD51 MCU has a USB device port that can be used to communicate
with a host PC. See the :ref:`usb-samples` sample applications for
more, such as the :zephyr:code-sample:`usb-cdc-acm` sample which sets up a virtual
serial port that echos characters back to the host PC.
Programming and Debugging
*************************
The Grand Central ships with a BOSSA compatible UF2 bootloader.
The bootloader can be entered by quickly tapping the reset button twice.
Flashing
========
#. Build the Zephyr kernel and the :ref:`hello_world` sample application:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_grand_central_m4_express
:goals: build
:compact:
#. Connect the Grand Central to your host computer using USB.
#. Connect a 3.3 V USB to serial adapter to the board and to the
host. See the `Serial Port`_ section above for the board's pin
connections.
#. Run your favorite terminal program to listen for output. Under Linux the
terminal should be :code:`/dev/ttyUSB0`. For example:
.. code-block:: console
$ minicom -D /dev/ttyUSB0 -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
#. Tap the reset button twice quickly to enter bootloader mode
#. Flash the image:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_grand_central_m4_express
:goals: flash
:compact:
You should see "Hello World! adafruit_grand_central_m4_express" in your terminal.
Debugging
=========
In addition to the built-in bootloader, the Grand Central can be flashed and
debugged using a SWD probe such as the Segger J-Link.
#. Connect the probe to the board using the 10-pin SWD interface.
#. Flash the image:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_grand_central_m4_express
:goals: flash
:flash-args: -r openocd
:compact:
#. Start debugging:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_grand_central_m4_express
:goals: debug
:compact:
References
**********
.. target-notes::
.. _Adafruit Learning System:
path_to_url
.. _pinouts:
path_to_url
.. _schematics:
path_to_url
.. _J-Link:
path_to_url
``` | /content/code_sandbox/boards/adafruit/grand_central_m4_express/doc/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,471 |
```yaml
board:
name: adafruit_feather_m0_lora
vendor: adafruit
socs:
- name: samd21g18a
``` | /content/code_sandbox/boards/adafruit/feather_m0_lora/board.yml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 36 |
```unknown
/*
*
*/
/dts-v1/;
#include <atmel/samd21.dtsi>
#include <atmel/samx2xx18.dtsi>
#include "adafruit_feather_m0_lora-pinctrl.dtsi"
#include "feather_connector.dtsi"
/ {
model = "Adafruit Feather M0 LoRa";
compatible = "adafruit,feather-m0-lora", "atmel,samd21g18a",
"atmel,samd21";
chosen {
zephyr,console = &sercom0;
zephyr,shell-uart = &sercom0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &code_partition;
};
/* These aliases are provided for compatibility with samples */
aliases {
led0 = &led0;
lora0 = &lora;
};
leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <&porta 17 0>;
label = "LED";
};
};
};
&cpu0 {
clock-frequency = <48000000>;
};
&sercom0 {
status = "okay";
compatible = "atmel,sam0-uart";
current-speed = <115200>;
rxpo = <3>;
txpo = <1>;
pinctrl-0 = <&sercom0_uart_default>;
pinctrl-names = "default";
};
&sercom3 {
status = "okay";
compatible = "atmel,sam0-i2c";
clock-frequency = <I2C_BITRATE_FAST>;
#address-cells = <1>;
#size-cells = <0>;
pinctrl-0 = <&sercom3_i2c_default>;
pinctrl-names = "default";
};
&sercom4 {
status = "okay";
compatible = "atmel,sam0-spi";
#address-cells = <1>;
#size-cells = <0>;
dipo = <0>;
dopo = <1>;
pinctrl-0 = <&sercom4_spi_default>;
pinctrl-names = "default";
cs-gpios = <&porta 6 GPIO_ACTIVE_LOW>;
lora: radio@0 {
reg = <0>;
compatible = "semtech,sx1276";
reset-gpios = <&porta 8 GPIO_ACTIVE_LOW>;
dio-gpios = <&porta 9 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
spi-max-frequency = <10000000>;
power-amplifier-output = "pa-boost";
};
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "sam-ba";
reg = <0x00000000 DT_SIZE_K(8)>;
read-only;
};
code_partition: partition@2000 {
label = "code";
reg = <0x2000 DT_SIZE_K(232)>;
read-only;
};
/*
* The final 16 KiB is reserved for the application.
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@3c000 {
label = "storage";
reg = <0x0003c000 DT_SIZE_K(16)>;
};
};
};
&usb0 {
status = "okay";
pinctrl-0 = <&usb_dc_default>;
pinctrl-names = "default";
};
``` | /content/code_sandbox/boards/adafruit/feather_m0_lora/adafruit_feather_m0_lora.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 809 |
```unknown
/*
*
*/
feather_i2c: &sercom3 {};
``` | /content/code_sandbox/boards/adafruit/feather_m0_lora/feather_connector.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 15 |
```unknown
CONFIG_SOC_ATMEL_SAMD_XOSC32K=y
CONFIG_SOC_ATMEL_SAMD_XOSC32K_AS_MAIN=y
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
``` | /content/code_sandbox/boards/adafruit/feather_m0_lora/adafruit_feather_m0_lora_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 57 |
```unknown
/*
*/
#include <dt-bindings/pinctrl/samd21-da1gXabcd-pinctrl.h>
&pinctrl {
sercom3_i2c_default: sercom3_i2c_default {
group1 {
pinmux = <PA22C_SERCOM3_PAD0>,
<PA23C_SERCOM3_PAD1>;
};
};
sercom4_spi_default: sercom4_spi_default {
group1 {
pinmux = <PA12D_SERCOM4_PAD0>,
<PB10D_SERCOM4_PAD2>,
<PB11D_SERCOM4_PAD3>;
};
};
sercom0_uart_default: sercom0_uart_default {
group1 {
pinmux = <PA11C_SERCOM0_PAD3>,
<PA10C_SERCOM0_PAD2>;
};
};
usb_dc_default: usb_dc_default {
group1 {
pinmux = <PA25G_USB_DP>,
<PA24G_USB_DM>;
};
};
};
``` | /content/code_sandbox/boards/adafruit/feather_m0_lora/adafruit_feather_m0_lora-pinctrl.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 226 |
```cmake
include(${ZEPHYR_BASE}/boards/common/bossac.board.cmake)
board_runner_args(jlink "--device=nRF52840_xxAA" "--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)
``` | /content/code_sandbox/boards/adafruit/itsybitsy/board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 130 |
```restructuredtext
.. _adafruit_feather_m0_lora:
Adafruit Feather M0 LoRa
########################
Overview
********
The Adafruit Feather M0 Lora is a thin, light ARM development
boards with an onboard battery connector and charger for 3.7 V lithium
polymer batteries, charging status indicator and user LEDs, native USB
connector, 20 I/O pins, and a LoRa radio module from Semtech.
.. image:: img/adafruit_feather_m0_lora.jpg
:align: center
:alt: Adafruit Feather M0 LoRa
Hardware
********
- ATSAMD21G18A ARM Cortex-M0+ processor at 48 MHz
- 32.768 kHz crystal oscillator
- 256 KiB flash memory and 32 KiB of RAM
- Battery connector and charger for 3.7 V lithium polymer batteries
- Charging indicator LED
- User LED
- Reset button
- Native USB port
- SX127x LoRa radio
Supported Features
==================
The adafruit_feather_m0_lora board configuration supports the
following hardware features:
+-----------+------------+------------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+==========================================+
| NVIC | on-chip | Nested vector interrupt controller |
+-----------+------------+------------------------------------------+
| Flash | on-chip | Can be used with LittleFS to store files |
+-----------+------------+------------------------------------------+
| SYSTICK | on-chip | Systick |
+-----------+------------+------------------------------------------+
| WDT | on-chip | Watchdog |
+-----------+------------+------------------------------------------+
| GPIO | on-chip | I/O ports |
+-----------+------------+------------------------------------------+
| USART | on-chip | Serial port |
+-----------+------------+------------------------------------------+
| I2C | on-chip | Inter-Integrated Circuit |
+-----------+------------+------------------------------------------+
| SPI | on-chip | Serial Peripheral Interface port |
+-----------+------------+------------------------------------------+
| USB | on-chip | USB device |
+-----------+------------+------------------------------------------+
| RADIO | SPI | LoRa radio |
+-----------+------------+------------------------------------------+
Other hardware features are not currently supported by Zephyr.
The default configuration can be found in the Kconfig file
:zephyr_file:`boards/adafruit/feather_m0_lora/adafruit_feather_m0_lora_defconfig`.
Connections and IOs
===================
The `Adafruit Feather M0 with LoRa radio module Learn site`_ has detailed
information about the board including `pinouts`_ and the `schematic`_.
System Clock
============
The SAMD21 MCU is configured to use the 32.768 kHz external oscillator
with the on-chip PLL generating the 48 MHz system clock.
Serial Port
===========
The SAMD21 MCU has 6 SERCOM based USARTs. On the Adafruit Feather M0
with LoRa, SERCOM0 is the Zephyr console and is available on pins 0
(RX) and 1 (TX).
I2C Port
========
The SAMD21 MCU has 6 SERCOM based USARTs. On the Adafruit Feather M0
with LoRa, SERCOM3 is available on pin 20 (SDA) and pin 21 (SCL).
SPI Port
========
The SAMD21 MCU has 6 SERCOM based SPIs. On the Adafruit Feather M0
with LoRa, SERCOM4 is available on pin 22 (MISO), pin 23 (MOSI), and
pin 24 (SCK).
USB Device Port
===============
The SAMD21 MCU has a USB device port that can be used to communicate
with a host PC. See the :ref:`usb-samples` sample applications for
more, such as the :zephyr:code-sample:`usb-cdc-acm` sample which sets up a virtual
serial port that echos characters back to the host PC.
LoRa Radio
==========
The Semtech SX127x radio chip on the Adafruit Feather M0 with LoRa
is attached to the SPI port (SERCOM4). Depending on the hardware
version, 433MHz or 900MHz is supported.
Programming and Debugging
*************************
The Adafruit Feather M0 with LoRa ships with a BOSSA compatible
SAM-BA bootloader. The bootloader can be entered by quickly tapping
the reset button twice.
Flashing
========
#. Build the Zephyr kernel and the :ref:`hello_world` sample application:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_feather_m0_lora
:goals: build
:compact:
#. Connect the Adafruit Feather M0 with LoRa to your host computer
using USB
#. Connect a 3.3 V USB to serial adapter to the board and to the
host. See the `Serial Port`_ section above for the board's pin
connections.
#. 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
#. Tap the reset button twice quickly to enter bootloader mode
#. Flash the image:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_feather_m0_lora
:goals: flash
:compact:
You should see "Hello World! adafruit_feather_m0_lora" in your terminal.
References
**********
.. target-notes::
.. _Adafruit Feather M0 with LoRa radio module Learn site:
path_to_url
.. _pinouts:
path_to_url
.. _schematic:
path_to_url
``` | /content/code_sandbox/boards/adafruit/feather_m0_lora/doc/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,341 |
```unknown
# Adafruit ItsyBitsy nRF52840 Express board configuration
config BOARD_ADAFRUIT_ITSYBITSY
select SOC_NRF52840_QIAA
``` | /content/code_sandbox/boards/adafruit/itsybitsy/Kconfig.adafruit_itsybitsy | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 38 |
```cmake
# Suppress "unique_unit_address_if_enabled" to handle the following overlaps:
# - power@40000000 & clock@40000000 & bprot@40000000
# - acl@4001e000 & flash-controller@4001e000
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
``` | /content/code_sandbox/boards/adafruit/itsybitsy/pre_dt_board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 72 |
```unknown
/*
*
*/
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "adafruit_itsybitsy_nrf52840-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <zephyr/dt-bindings/led/led.h>
/ {
model = "Adafruit ItsyBitsy nRF52840 Express";
compatible = "adafruit,itsybitsy-nrf52840";
chosen {
zephyr,console = &cdc_acm_uart0;
zephyr,shell-uart = &cdc_acm_uart0;
zephyr,uart-mcumgr = &cdc_acm_uart0;
zephyr,bt-mon-uart = &cdc_acm_uart0;
zephyr,bt-c2h-uart = &cdc_acm_uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &code_partition;
zephyr,ieee802154 = &ieee802154;
};
leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
label = "Red LED";
};
};
buttons {
compatible = "gpio-keys";
button0: button_0 {
gpios = <&gpio0 29 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "Push button switch";
zephyr,code = <INPUT_KEY_0>;
};
};
/* These aliases are provided for compatibility with samples */
aliases {
led0 = &led0;
sw0 = &button0;
watchdog0 = &wdt0;
led-strip = &apa102;
};
};
®1 {
regulator-initial-mode = <NRF5X_REG_MODE_DCDC>;
};
&adc {
status = "okay";
};
&uicr {
gpio-as-nreset;
};
&gpiote {
status = "okay";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&uart0 {
compatible = "nordic,nrf-uarte";
current-speed = <115200>;
status = "disabled";
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
};
&i2c0 {
compatible = "nordic,nrf-twi";
status = "okay";
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
};
&spi1 {
compatible = "nordic,nrf-spi";
status = "okay";
pinctrl-0 = <&spi1_default>;
pinctrl-1 = <&spi1_sleep>;
pinctrl-names = "default", "sleep";
};
&spi2 {
compatible = "nordic,nrf-spi";
status = "okay";
pinctrl-0 = <&spi2_default>;
pinctrl-1 = <&spi2_sleep>;
pinctrl-names = "default", "sleep";
apa102: apa102@0 {
compatible = "apa,apa102";
reg = <0>;
spi-max-frequency = <5250000>;
chain-length = <1>;
color-mapping = <LED_COLOR_ID_BLUE
LED_COLOR_ID_GREEN
LED_COLOR_ID_RED>;
};
};
&qspi {
status = "okay";
pinctrl-0 = <&qspi_default>;
pinctrl-1 = <&qspi_sleep>;
pinctrl-names = "default", "sleep";
gd25q16: gd25q16@0 {
compatible = "nordic,qspi-nor";
reg = <0>;
writeoc = "pp4o";
readoc = "read4io";
sck-frequency = <32000000>;
jedec-id = [c8 40 15];
size = <16777216>;
has-dpd;
t-enter-dpd = <20000>;
t-exit-dpd = <20000>;
quad-enable-requirements = "S2B1v1";
};
};
&ieee802154 {
status = "okay";
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/* To enable flashing with UF2 bootloader, we
* must reserve a partition for SoftDevice.
* See path_to_url#hathach-memory-map
*/
reserved_partition_0: partition@0 {
label = "SoftDevice";
reg = <0x000000000 DT_SIZE_K(152)>;
};
code_partition: partition@26000 {
label = "Application";
reg = <0x00026000 DT_SIZE_K(796)>;
};
/*
* The flash starting at 0x000ed000 and ending at
* 0x000f4000 is reserved for use by the application.
*/
storage_partition: partition@ed000 {
label = "storage";
reg = <0x0000ed000 DT_SIZE_K(28)>;
};
boot_partition: partition@f4000 {
label = "UF2";
reg = <0x000f4000 DT_SIZE_K(48)>;
};
};
};
&gd25q16 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
lfs_partition: partition@0 {
label = "lfs_storage";
reg = <0x00000000 DT_SIZE_M(2)>;
};
};
};
zephyr_udc0: &usbd {
compatible = "nordic,nrf-usbd";
status = "okay";
cdc_acm_uart0: cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart";
};
};
``` | /content/code_sandbox/boards/adafruit/itsybitsy/adafruit_itsybitsy_nrf52840.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,371 |
```unknown
# Enable MPU
CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
# enable uart driver
CONFIG_SERIAL=y
# enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
# Flashing
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_BUILD_OUTPUT_UF2=y
``` | /content/code_sandbox/boards/adafruit/itsybitsy/adafruit_itsybitsy_nrf52840_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 61 |
```yaml
identifier: adafruit_itsybitsy/nrf52840
name: Adafruit ItsyBitsy nRF52840 Express
type: mcu
arch: arm
ram: 256
flash: 1024
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- adc
- ble
- counter
- gpio
- i2c
- pwm
- spi
- usb_device
- watchdog
vendor: adafruit
``` | /content/code_sandbox/boards/adafruit/itsybitsy/adafruit_itsybitsy_nrf52840.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 116 |
```yaml
board:
name: adafruit_itsybitsy
vendor: adafruit
socs:
- name: nrf52840
``` | /content/code_sandbox/boards/adafruit/itsybitsy/board.yml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 33 |
```unknown
# Adafruit ItsyBitsy nRF52840 Express board configuration
config BOARD_SERIAL_BACKEND_CDC_ACM
bool "USB CDC"
default y
depends on BOARD_ADAFRUIT_ITSYBITSY
``` | /content/code_sandbox/boards/adafruit/itsybitsy/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 47 |
```unknown
# Adafruit ItsyBitsy nRF52840 Express board configuration
if BOARD_ADAFRUIT_ITSYBITSY
config BT_CTLR
default BT
if BOARD_SERIAL_BACKEND_CDC_ACM
config USB_DEVICE_STACK
default y
config USB_CDC_ACM
default SERIAL
config UART_CONSOLE
default CONSOLE
config USB_DEVICE_INITIALIZE_AT_BOOT
default y if CONSOLE
config SHELL_BACKEND_SERIAL_CHECK_DTR
default SHELL
depends on UART_LINE_CTRL
config UART_LINE_CTRL
default SHELL
config USB_DEVICE_REMOTE_WAKEUP
default n
if LOG
# Logger cannot use itself to log
config USB_CDC_ACM_LOG_LEVEL
default 0
# Set USB log level to error only
config USB_DEVICE_LOG_LEVEL
default 1
# Wait 1500ms at startup for logging
config LOG_PROCESS_THREAD_STARTUP_DELAY_MS
default 1500
endif # LOG
endif # BOARD_SERIAL_BACKEND_CDC_ACM
endif # BOARD_ADAFRUIT_ITSYBITSY
``` | /content/code_sandbox/boards/adafruit/itsybitsy/Kconfig.defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 219 |
```unknown
/*
*/
&pinctrl {
uart0_default: uart0_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 24)>,
<NRF_PSEL(UART_RX, 0, 25)>;
};
};
uart0_sleep: uart0_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 24)>,
<NRF_PSEL(UART_RX, 0, 25)>;
low-power-enable;
};
};
i2c0_default: i2c0_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 16)>,
<NRF_PSEL(TWIM_SCL, 0, 14)>;
};
};
i2c0_sleep: i2c0_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 16)>,
<NRF_PSEL(TWIM_SCL, 0, 14)>;
low-power-enable;
};
};
spi2_default: spi2_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 1, 9)>,
<NRF_PSEL(SPIM_MOSI, 0, 8)>;
};
};
spi2_sleep: spi2_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 1, 9)>,
<NRF_PSEL(SPIM_MOSI, 0, 8)>;
low-power-enable;
};
};
spi1_default: spi1_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 13)>,
<NRF_PSEL(SPIM_MOSI, 0, 15)>,
<NRF_PSEL(SPIM_MISO, 0, 20)>;
};
};
spi1_sleep: spi1_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 13)>,
<NRF_PSEL(SPIM_MOSI, 0, 15)>,
<NRF_PSEL(SPIM_MISO, 0, 20)>;
low-power-enable;
};
};
qspi_default: qspi_default {
group1 {
psels = <NRF_PSEL(QSPI_SCK, 0, 19)>,
<NRF_PSEL(QSPI_IO0, 0, 21)>,
<NRF_PSEL(QSPI_IO1, 0, 22)>,
<NRF_PSEL(QSPI_IO2, 1, 00)>,
<NRF_PSEL(QSPI_IO3, 0, 17)>,
<NRF_PSEL(QSPI_CSN, 0, 23)>;
};
};
qspi_sleep: qspi_sleep {
group1 {
psels = <NRF_PSEL(QSPI_SCK, 0, 19)>,
<NRF_PSEL(QSPI_IO0, 0, 21)>,
<NRF_PSEL(QSPI_IO1, 0, 22)>,
<NRF_PSEL(QSPI_IO2, 1, 00)>,
<NRF_PSEL(QSPI_IO3, 0, 17)>,
<NRF_PSEL(QSPI_CSN, 0, 23)>;
low-power-enable;
};
};
};
``` | /content/code_sandbox/boards/adafruit/itsybitsy/adafruit_itsybitsy_nrf52840-pinctrl.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 794 |
```cmake
board_runner_args(uf2 "--board-id=RPI-RP2")
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
``` | /content/code_sandbox/boards/adafruit/qt_py_rp2040/board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 34 |
```unknown
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=125000000
# Enable UART driver
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
# Enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
# Enable reset by default
CONFIG_RESET=y
# Enable clock control by default
CONFIG_CLOCK_CONTROL=y
# Code partition needed to target the correct flash range
CONFIG_USE_DT_CODE_PARTITION=y
# Output UF2 by default, native bootloader supports it.
CONFIG_BUILD_OUTPUT_UF2=y
``` | /content/code_sandbox/boards/adafruit/qt_py_rp2040/adafruit_qt_py_rp2040_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 105 |
```yaml
identifier: adafruit_qt_py_rp2040
name: Adafruit QT Py RP2040
type: mcu
arch: arm
flash: 8192
ram: 264
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- uart
- gpio
- adc
- i2c
- spi
- hwinfo
- watchdog
- pwm
- flash
- dma
- counter
- clock
``` | /content/code_sandbox/boards/adafruit/qt_py_rp2040/adafruit_qt_py_rp2040.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 116 |
```unknown
/*
*/
#include <dt-bindings/pinctrl/rpi-pico-rp2040-pinctrl.h>
&pinctrl {
uart1_default: uart1_default {
group1 {
pinmux = <UART1_TX_P20>;
};
group2 {
pinmux = <UART1_RX_P5>;
input-enable;
};
};
i2c0_default: i2c0_default {
group1 {
pinmux = <I2C0_SDA_P24>;
input-enable;
};
group2 {
pinmux = <I2C0_SCL_P25>;
input-enable;
};
};
i2c1_default: i2c1_default {
group1 {
pinmux = <I2C1_SDA_P22>;
input-enable;
};
group2 {
pinmux = <I2C1_SCL_P23>;
input-enable;
};
};
spi0_default: spi0_default {
group1 {
pinmux = <SPI0_TX_P3>;
};
group2 {
pinmux = <SPI0_RX_P4>;
input-enable;
};
group3 {
pinmux = <SPI0_SCK_P6>;
};
};
adc_default: adc_default {
group1 {
pinmux = <ADC_CH0_P26>, <ADC_CH1_P27>, <ADC_CH2_P28>, <ADC_CH3_P29>;
input-enable;
};
};
clocks_default: clocks_default {
};
ws2812_pio1_default: ws2812_pio1_default {
ws2812 {
pinmux = <PIO1_P12>;
};
};
};
``` | /content/code_sandbox/boards/adafruit/qt_py_rp2040/adafruit_qt_py_rp2040-pinctrl.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 386 |
```unknown
/*
*
*/
/ {
xiao_d: connector {
compatible = "seeed,xiao-gpio";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map = <0 0 &gpio0 29 0>, /* D0 */
<1 0 &gpio0 28 0>, /* D1 */
<2 0 &gpio0 27 0>, /* D2 */
<3 0 &gpio0 26 0>, /* D3 */
<4 0 &gpio0 24 0>, /* D4 */
<5 0 &gpio0 25 0>, /* D5 */
<6 0 &gpio0 20 0>, /* D6 */
<7 0 &gpio0 5 0>, /* D7 */
<8 0 &gpio0 6 0>, /* D8 */
<9 0 &gpio0 4 0>, /* D9 */
<10 0 &gpio0 3 0>; /* D10 */
};
};
xiao_spi: &spi0 {};
xiao_i2c: &i2c0 {};
xiao_serial: &uart1 {};
``` | /content/code_sandbox/boards/adafruit/qt_py_rp2040/seeed_xiao_connector.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 315 |
```restructuredtext
.. _adafruit_itsybitsy_nrf52840:
Adafruit ItsyBitsy nRF52840
###########################
Overview
********
The Adafruit ItsyBitsy nRF52840 Express is a small (36 mm x 18 mm) ARM
development board with an onboard RGB LED, USB port, 2 MB of QSPI flash,
and range of I/O broken out onto 21 GPIO pins.
This development kit has the following features:
* :abbr:`ADC (Analog to Digital Converter)`
* CLOCK
* FLASH
* :abbr:`GPIO (General Purpose Input Output)`
* :abbr:`I2C (Inter-Integrated Circuit)`
* :abbr:`I2S (Inter-Integrated Sound)`
* :abbr:`MPU (Memory Protection Unit)`
* :abbr:`NVIC (Nested Vectored Interrupt Controller)`
* :abbr:`PWM (Pulse Width Modulation)`
* :abbr:`QSPI (Quad Serial Peripheral Interface)`
* RADIO (Bluetooth Low Energy and 802.15.4)
* :abbr:`RTC (nRF RTC System Clock)`
* :abbr:`SPI (Serial Peripheral Interface)`
* :abbr:`UARTE (Universal asynchronous receiver-transmitter)`
* :abbr:`USB (Universal Serial Bus)`
* :abbr:`WDT (Watchdog Timer)`
.. image:: img/adafruit_itsybitsy_nrf52840.jpeg
:align: center
:alt: Adafruit ItsyBitsy nRF52840 Express
Hardware
********
- nRF52840 ARM Cortex-M4F CPU at 64MHz
- 1 MB of flash memory and 256 KB of SRAM
- 2 MB of QSPI flash
- A user LED
- A user switch
- An RGB DotStar LED
- Native USB port
- One reset button
Supported Features
==================
The Adafruit ItsyBitsy 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 | on-chip | i2c |
+-----------+------------+----------------------+
| MPU | on-chip | arch/arm |
+-----------+------------+----------------------+
| NVIC | on-chip | arch/arm |
+-----------+------------+----------------------+
| PWM | on-chip | pwm |
+-----------+------------+----------------------+
| QSPI(M) | on-chip | nor |
+-----------+------------+----------------------+
| RADIO | on-chip | Bluetooth, |
| | | ieee802154 |
+-----------+------------+----------------------+
| RTC | on-chip | system clock |
+-----------+------------+----------------------+
| SPI | on-chip | spi |
+-----------+------------+----------------------+
| UARTE | on-chip | serial |
+-----------+------------+----------------------+
| USB | on-chip | usb |
+-----------+------------+----------------------+
| WDT | on-chip | watchdog |
+-----------+------------+----------------------+
Other hardware features have not been enabled yet for this board.
Connections and IOs
===================
The `Adafruit ItsyBitsy nRF52840 Express Learn site`_ has detailed
information about the board including `pinouts`_ and the `schematic`_.
LED
---
* LED0 (red) = P0.06
* LED1 (Adafruit DotStar)
* DATA = P0.08
* CLK = P1.09
Push buttons
------------
* SWITCH = P0.29
* RESET = P0.18
Logging
-------
Logging is done using the USB-CDC port. See the :zephyr:code-sample:`logging` sample
or the :zephyr:code-sample:`usb-cdc-acm-console` sample applications to see how this works.
Testing LEDs and buttons on the Adafruit ItsyBitsy nRF52840 Express
*******************************************************************
The :zephyr:code-sample:`button` sample lets you test the buttons (switches) and the red LED.
The :zephyr:code-sample:`blinky` sample lets you test the red LED.
The DotStar LED has been implemented as a SPI device and can be tested
with the :zephyr:code-sample:`led-strip` sample application.
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/adafruit/itsybitsy/adafruit_itsybitsy_nrf52840.dts`.
Programming and Debugging
*************************
The ItsyBitsy ships with the BOSSA compatible UF2 bootloader. The
bootloader can be entered by quickly tapping the reset button twice.
First time setup
================
Some versions of this board were shipped with a buggy bootloader.
Ensure that the bootloader is up to date by following the
`Adafruit UF2 Bootloader update`_ tutorial. Note that this tutorial
was made for the Adafruit Feather nRF52840, but the steps to update
the bootloader are the same for the ItsyBitsy. The files for the
ItsyBitsy bootloader can be found in the `Adafruit nRF52 Bootloader repo`_.
The building and flashing of Zephyr applications have been tested with
release 0.7.0 of the UF2 bootloader.
Flashing
========
Flashing is done by dragging and dropping the built Zephyr UF2-file
into the :code:`ITSY840BOOT` drive.
#. Build the Zephyr kernel and the :zephyr:code-sample:`blinky`
sample application:
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: adafruit_itsybitsy/nrf52840
:goals: build
:compact:
#. Connect the ItsyBitsy to your host computer using USB
#. Tap the reset button twice quickly to enter bootloader mode
#. Flash the image:
Drag and drop the file :code:`samples/basic/blinky/build/zephyr/zephyr.uf2`
into :code:`ITSY840BOOT`
The device will disconnect and you should see the red LED blink.
References
**********
.. target-notes::
.. _Adafruit ItsyBitsy nRF52840 Express Learn site:
path_to_url
.. _pinouts:
path_to_url
.. _schematic:
path_to_url
.. _Adafruit UF2 Bootloader update:
path_to_url
.. _Adafruit nRF52 Bootloader repo:
path_to_url
``` | /content/code_sandbox/boards/adafruit/itsybitsy/doc/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,523 |
```unknown
config BOARD_ADAFRUIT_QT_PY_RP2040
select SOC_RP2040
``` | /content/code_sandbox/boards/adafruit/qt_py_rp2040/Kconfig.adafruit_qt_py_rp2040 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 23 |
```yaml
board:
name: adafruit_qt_py_rp2040
vendor: adafruit
socs:
- name: rp2040
``` | /content/code_sandbox/boards/adafruit/qt_py_rp2040/board.yml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 33 |
```unknown
if BOARD_ADAFRUIT_QT_PY_RP2040
config RP2_FLASH_W25Q080
default y
if I2C_DW
config I2C_DW_CLOCK_SPEED
default 125
endif #I2C_DW
config USB_SELF_POWERED
default n
endif # BOARD_ADAFRUIT_QT_PY_RP2040
``` | /content/code_sandbox/boards/adafruit/qt_py_rp2040/Kconfig.defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 80 |
```unknown
/*
*
*/
/dts-v1/;
#include <rpi_pico/rp2040.dtsi>
#include "adafruit_qt_py_rp2040-pinctrl.dtsi"
#include "seeed_xiao_connector.dtsi"
#include <freq.h>
#include <zephyr/dt-bindings/led/led.h>
/ {
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,flash-controller = &ssi;
zephyr,console = &uart1;
zephyr,shell-uart = &uart1;
zephyr,code-partition = &code_partition;
};
aliases {
watchdog0 = &wdt0;
led-strip = &ws2812;
};
};
&flash0 {
reg = <0x10000000 DT_SIZE_M(8)>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/* Reserved memory for the second stage bootloader */
second_stage_bootloader: partition@0 {
label = "second_stage_bootloader";
reg = <0x00000000 0x100>;
read-only;
};
/*
* Usable flash. Starts at 0x100, after the bootloader. The partition
* size is 8MB minus the 0x100 bytes taken by the bootloader.
*/
code_partition: partition@100 {
label = "code-partition";
reg = <0x100 (DT_SIZE_M(8) - 0x100)>;
read-only;
};
};
};
&clocks {
pinctrl-0 = <&clocks_default>;
pinctrl-names = "default";
};
&uart1 {
current-speed = <115200>;
status = "okay";
pinctrl-0 = <&uart1_default>;
pinctrl-names = "default";
};
&gpio0 {
status = "okay";
/*
* Unlike some of the other Adafruit boards, the neopixel on this board has
* its positive side hooked up to a GPIO pin rather than a positive voltage
* rail to save on power. This will enable the LED on board initialization.
*/
neopixel-power-enable {
gpio-hog;
gpios = <11 GPIO_ACTIVE_HIGH>;
output-high;
};
};
&i2c0 {
clock-frequency = <I2C_BITRATE_FAST>;
status = "okay";
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
};
&i2c1 {
pinctrl-0 = <&i2c1_default>;
pinctrl-names = "default";
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
};
&spi0 {
clock-frequency = <DT_FREQ_M(8)>;
status = "okay";
pinctrl-0 = <&spi0_default>;
pinctrl-names = "default";
};
&timer {
status = "okay";
};
&wdt0 {
status = "okay";
};
&adc {
status = "okay";
pinctrl-0 = <&adc_default>;
pinctrl-names = "default";
};
&pio0 {
status = "okay";
};
&pio1 {
status = "okay";
/*
* Need to put this on PIO1 as having this on PIO0 causes the GPIO hog to
* not work.
*/
pio-ws2812 {
compatible = "worldsemi,ws2812-rpi_pico-pio";
status = "okay";
pinctrl-0 = <&ws2812_pio1_default>;
pinctrl-names = "default";
bit-waveform = <3>, <3>, <4>;
ws2812: ws2812 {
status = "okay";
gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
chain-length = <1>;
color-mapping = <LED_COLOR_ID_GREEN
LED_COLOR_ID_RED
LED_COLOR_ID_BLUE>;
reset-delay = <280>;
frequency = <800000>;
};
};
};
zephyr_udc0: &usbd {
status = "okay";
};
&vreg {
regulator-always-on;
regulator-allowed-modes = <REGULATOR_RPI_PICO_MODE_NORMAL>;
};
``` | /content/code_sandbox/boards/adafruit/qt_py_rp2040/adafruit_qt_py_rp2040.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 955 |
```restructuredtext
.. _adafruit_qt_py_rp2040:
Adafruit QT Py RP2040
#####################
Overview
********
The Adafruit QT Py RP2040 is a small, low-cost, versatile board from
Adafruit. It is equipped with an RP2040 SoC, an on-board RGB Neopixel,
a USB connector, and a STEMMA QT connector. The USB bootloader allows
it to be flashed without any adapter, in a drag-and-drop manner.
Hardware
********
- Dual core Arm Cortex-M0+ processor running up to 133MHz
- 264KB on-chip SRAM
- 8MB on-board QSPI flash with XIP capabilities
- 11 GPIO pins
- 4 Analog inputs
- 2 UART peripherals
- 2 SPI controllers
- 2 I2C controllers (one via STEMMA QT connector)
- 16 PWM channels
- USB 1.1 controller (host/device)
- 8 Programmable I/O (PIO) for custom peripherals
- On-board RGB LED
- 1 Watchdog timer peripheral
.. figure:: img/qtpy_rp2040.jpg
:align: center
:alt: Adafruit QT Py RP2040
Adafruit QT Py RP2040 (Image courtesy of Adafruit)
Supported Features
==================
The adafruit_qt_py_rp2040 board configuration supports the following
hardware features:
.. list-table::
:header-rows: 1
* - Peripheral
- Kconfig option
- Devicetree compatible
* - NVIC
- N/A
- :dtcompatible:`arm,v6m-nvic`
* - UART
- :kconfig:option:`CONFIG_SERIAL`
- :dtcompatible:`raspberrypi,pico-uart`
* - GPIO
- :kconfig:option:`CONFIG_GPIO`
- :dtcompatible:`raspberrypi,pico-gpio`
* - ADC
- :kconfig:option:`CONFIG_ADC`
- :dtcompatible:`raspberrypi,pico-adc`
* - I2C
- :kconfig:option:`CONFIG_I2C`
- :dtcompatible:`snps,designware-i2c`
* - SPI
- :kconfig:option:`CONFIG_SPI`
- :dtcompatible:`raspberrypi,pico-spi`
* - USB Device
- :kconfig:option:`CONFIG_USB_DEVICE_STACK`
- :dtcompatible:`raspberrypi,pico-usbd`
* - HWINFO
- :kconfig:option:`CONFIG_HWINFO`
- N/A
* - Watchdog Timer (WDT)
- :kconfig:option:`CONFIG_WATCHDOG`
- :dtcompatible:`raspberrypi,pico-watchdog`
* - PWM
- :kconfig:option:`CONFIG_PWM`
- :dtcompatible:`raspberrypi,pico-pwm`
* - Flash
- :kconfig:option:`CONFIG_FLASH`
- :dtcompatible:`raspberrypi,pico-flash`
* - UART (PIO)
- :kconfig:option:`CONFIG_SERIAL`
- :dtcompatible:`raspberrypi,pico-uart-pio`
Pin Mapping
===========
The peripherals of the RP2040 SoC can be routed to various pins on the board.
The configuration of these routes can be modified through DTS. Please refer to
the datasheet to see the possible routings for each peripheral.
Default Zephyr Peripheral Mapping:
----------------------------------
.. rst-class:: rst-columns
- UART1_TX : P20
- UART1_RX : P5
- I2C0_SDA : P24
- I2C0_SCL : P25
- I2C1_SDA : P22
- I2C1_SCL : P23
- SPI0_RX : P4
- SPI0_SCK : P6
- SPI0_TX : P3
Programming and Debugging
*************************
Flashing
========
Using UF2
---------
Since it doesn't expose the SWD pins, you must flash the Adafruit QT Py RP2040 with
a UF2 file. By default, building an app for this board will generate a
`build/zephyr/zephyr.uf2` file. If the QT Py RP2040 is powered on with the `BOOTSEL`
button pressed, it will appear on the host as a mass storage device. The
UF2 file should be drag-and-dropped to the device, which will flash the QT Py RP2040.
.. target-notes::
.. _Getting Started with Raspberry Pi Pico:
path_to_url
.. _Primary Guide\: Adafruit QT Py RP2040:
path_to_url
``` | /content/code_sandbox/boards/adafruit/qt_py_rp2040/doc/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,016 |
```unknown
/*
*/
#include <dt-bindings/pinctrl/same51g-pinctrl.h>
&pinctrl {
pwm0_default: pwm0_default {
group1 {
pinmux = <PA22G_TCC0_WO2>;
};
};
pwm1_default: pwm1_default {
group1 {
pinmux = <PA18F_TCC1_WO2>,
<PA19F_TCC1_WO3>;
};
};
sercom1_spi_default: sercom1_spi_default {
group1 {
pinmux = <PA0D_SERCOM1_PAD0>,
<PA1D_SERCOM1_PAD1>,
<PB23C_SERCOM1_PAD3>;
};
};
sercom3_uart_default: sercom3_uart_default {
group1 {
pinmux = <PA16D_SERCOM3_PAD1>,
<PA17D_SERCOM3_PAD0>;
};
};
usb_dc_default: usb_dc_default {
group1 {
pinmux = <PA25H_USB_DP>,
<PA24H_USB_DM>;
};
};
};
``` | /content/code_sandbox/boards/adafruit/itsybitsy_m4_express/adafruit_itsybitsy_m4_express-pinctrl.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 250 |
```cmake
include(${ZEPHYR_BASE}/boards/common/bossac.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
``` | /content/code_sandbox/boards/adafruit/itsybitsy_m4_express/board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 36 |
```unknown
/*
*
*/
/dts-v1/;
#include <atmel/samd5xx19.dtsi>
#include "adafruit_itsybitsy_m4_express-pinctrl.dtsi"
/ {
model = "Adafruit ItsyBitsy M4 Express";
compatible = "adafruit,itsybitsy-m4-express";
chosen {
zephyr,console = &sercom3;
zephyr,shell-uart = &sercom3;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &code_partition;
};
/* These aliases are provided for compatibility with samples */
aliases {
led0 = &led0;
pwm-led0 = &pwm_led0;
pwm-0 = &tcc0;
};
leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <&porta 22 0>;
label = "LED";
};
};
pwmleds {
compatible = "pwm-leds";
pwm_led0: pwm_led_0 {
pwms = <&tcc0 2 PWM_MSEC(20)>;
};
};
};
&cpu0 {
clock-frequency = <120000000>;
};
&sercom3 {
status = "okay";
compatible = "atmel,sam0-uart";
current-speed = <115200>;
rxpo = <1>;
txpo = <0>;
pinctrl-0 = <&sercom3_uart_default>;
pinctrl-names = "default";
};
&sercom1 {
status = "okay";
compatible = "atmel,sam0-spi";
dipo = <3>;
dopo = <0>;
#address-cells = <1>;
#size-cells = <0>;
pinctrl-0 = <&sercom1_spi_default>;
pinctrl-names = "default";
};
&tcc0 {
status = "okay";
compatible = "atmel,sam0-tcc-pwm";
prescaler = <8>;
#pwm-cells = <2>;
pinctrl-0 = <&pwm0_default>;
pinctrl-names = "default";
};
zephyr_udc0: &usb0 {
status = "okay";
pinctrl-0 = <&usb_dc_default>;
pinctrl-names = "default";
};
&dmac {
status = "okay";
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "uf2";
reg = <0x00000000 DT_SIZE_K(16)>;
read-only;
};
code_partition: partition@4000 {
label = "code";
reg = <0x4000 DT_SIZE_K(512-16-16)>;
read-only;
};
/*
* The final 16 KiB is reserved for the application.
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@7c000 {
label = "storage";
reg = <0x7c000 DT_SIZE_K(16)>;
};
};
};
``` | /content/code_sandbox/boards/adafruit/itsybitsy_m4_express/adafruit_itsybitsy_m4_express.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 741 |
```unknown
CONFIG_SOC_ATMEL_SAMD5X_OSCULP32K_AS_MAIN=y
CONFIG_BOOTLOADER_BOSSA=y
CONFIG_BOOTLOADER_BOSSA_ADAFRUIT_UF2=y
CONFIG_ARM_MPU=y
CONFIG_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
``` | /content/code_sandbox/boards/adafruit/itsybitsy_m4_express/adafruit_itsybitsy_m4_express_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 72 |
```cmake
# Suppress "unique_unit_address_if_enabled" to handle the following overlaps:
# - /soc/pinmux@41004400 & /soc/gpio@41004400
# - /soc/pinmux@41004480 & /soc/gpio@41004480
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
``` | /content/code_sandbox/boards/adafruit/itsybitsy_m4_express/pre_dt_board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 74 |
```yaml
identifier: adafruit_itsybitsy_m4_express
name: Adafruit ItsyBitsy M4 Express
type: mcu
arch: arm
ram: 192
flash: 512
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- dma
- gpio
- hwinfo
- pwm
- spi
- uart
- usb_device
- watchdog
vendor: adafruit
``` | /content/code_sandbox/boards/adafruit/itsybitsy_m4_express/adafruit_itsybitsy_m4_express.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 108 |
```unknown
config BOARD_ADAFRUIT_ITSYBITSY_M4_EXPRESS
select SOC_SAMD51G19A
``` | /content/code_sandbox/boards/adafruit/itsybitsy_m4_express/Kconfig.adafruit_itsybitsy_m4_express | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 27 |
```yaml
board:
name: adafruit_itsybitsy_m4_express
vendor: adafruit
socs:
- name: samd51g19a
``` | /content/code_sandbox/boards/adafruit/itsybitsy_m4_express/board.yml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 39 |
```ini
source [find interface/jlink.cfg]
transport select swd
set CHIPNAME atsamd51g19a
source [find target/atsame5x.cfg]
# TODO(path_to_url#/c/5706/): lower the clock speed to workaround
# an erase timeout.
adapter speed 500
reset_config srst_only
$_TARGETNAME configure -event gdb-attach {
echo "Debugger attaching: halting execution"
reset halt
}
$_TARGETNAME configure -event gdb-detach {
echo "Debugger detaching: resuming execution"
resume
}
``` | /content/code_sandbox/boards/adafruit/itsybitsy_m4_express/support/openocd.cfg | ini | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 121 |
```unknown
CONFIG_SOC_ATMEL_SAMD_OSC8M=y
CONFIG_SOC_ATMEL_SAMD_OSC8M_AS_MAIN=y
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_BOOTLOADER_BOSSA=y
CONFIG_BOOTLOADER_BOSSA_ADAFRUIT_UF2=y
CONFIG_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
``` | /content/code_sandbox/boards/adafruit/trinket_m0/adafruit_trinket_m0_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 82 |
```cmake
include(${ZEPHYR_BASE}/boards/common/bossac.board.cmake)
``` | /content/code_sandbox/boards/adafruit/trinket_m0/board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 19 |
```unknown
/*
*/
#include <dt-bindings/pinctrl/samd21-da1eXabcd-pinctrl.h>
&pinctrl {
pwm_default: pwm_default {
group1 {
pinmux = <PA10F_TCC0_WO2>;
};
};
sercom0_spi_default: sercom0_spi_default {
group1 {
pinmux = <PA9C_SERCOM0_PAD1>,
<PA6D_SERCOM0_PAD2>,
<PA7D_SERCOM0_PAD3>;
};
};
sercom1_spi_default: sercom1_spi_default {
group1 {
pinmux = <PA0D_SERCOM1_PAD0>,
<PA1D_SERCOM1_PAD1>;
};
};
sercom0_uart_default: sercom0_uart_default {
group1 {
pinmux = <PA7D_SERCOM0_PAD3>,
<PA6D_SERCOM0_PAD2>;
};
};
sercom2_uart_default: sercom2_uart_default {
group1 {
pinmux = <PA9D_SERCOM2_PAD1>,
<PA8D_SERCOM2_PAD0>;
};
};
usb_dc_default: usb_dc_default {
group1 {
pinmux = <PA25G_USB_DP>,
<PA24G_USB_DM>;
};
};
};
``` | /content/code_sandbox/boards/adafruit/trinket_m0/adafruit_trinket_m0-pinctrl.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 302 |
```unknown
config BOARD_ADAFRUIT_TRINKET_M0
select SOC_SAMD21E18A
``` | /content/code_sandbox/boards/adafruit/trinket_m0/Kconfig.adafruit_trinket_m0 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 23 |
```cmake
# SPI is implemented via sercom so node name isn't spi@...
list(APPEND EXTRA_DTC_FLAGS "-Wno-spi_bus_bridge")
# Suppress "unique_unit_address_if_enabled" to handle the following overlaps:
# - /soc/pinmux@41004400 & /soc/gpio@41004400
# - /soc/pinmux@41004480 & /soc/gpio@41004480
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
``` | /content/code_sandbox/boards/adafruit/trinket_m0/pre_dt_board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 104 |
```yaml
board:
name: adafruit_trinket_m0
vendor: adafruit
socs:
- name: samd21e18a
``` | /content/code_sandbox/boards/adafruit/trinket_m0/board.yml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 35 |
```yaml
identifier: adafruit_trinket_m0
name: Adafruit Trinket M0
type: mcu
arch: arm
ram: 32
flash: 256
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- adc
- counter
- dma
- gpio
- hwinfo
- pwm
- spi
- uart
- usb_device
- watchdog
vendor: adafruit
``` | /content/code_sandbox/boards/adafruit/trinket_m0/adafruit_trinket_m0.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 110 |
```restructuredtext
.. _adafruit_itsybitsy_m4_express:
Adafruit ItsyBitsy M4 Express
#############################
Overview
********
The Adafruit ItsyBitsy M4 express is a small (36 mm x 18 mm) ARM development
board with an onboard RGB LED, USB port, 2 MiB of SPI flash, and range of I/O
broken out onto 23 GPIO pins.
.. image:: img/adafruit_itsybitsy_m4_express.jpg
:align: center
:alt: Adafruit ItsyBitsy M4 Express
Hardware
********
- ATSAMD51G19A ARM Cortex-M4 processor at 120 MHz
- 512 KiB of flash memory and 192 KiB of RAM
- 2 MiB of SPI flash
- Internal trimmed 8 MHz oscillator
- A user LED
- An RGB DotStar LED
- Native USB port
- One reset button
Supported Features
==================
The adafruit_itsybitsy_m4_express board configuration supports the following
hardware features:
+-----------+------------+------------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+==========================================+
| NVIC | on-chip | Nested vector interrupt controller |
+-----------+------------+------------------------------------------+
| SYSTICK | on-chip | systick |
+-----------+------------+------------------------------------------+
| WDT | on-chip | Watchdog |
+-----------+------------+------------------------------------------+
| GPIO | on-chip | I/O ports |
+-----------+------------+------------------------------------------+
| USART | on-chip | Serial ports |
+-----------+------------+------------------------------------------+
| SPI | on-chip | Serial Peripheral Interface ports |
+-----------+------------+------------------------------------------+
| TRNG | on-chip | True Random Number Generator |
+-----------+------------+------------------------------------------+
| HWINFO | on-chip | Unique 128 bit serial number |
+-----------+------------+------------------------------------------+
| RTC | on-chip | Real-Time Counter |
+-----------+------------+------------------------------------------+
| USB | on-chip | USB device |
+-----------+------------+------------------------------------------+
| WDT | on-chip | Watchdog Timer |
+-----------+------------+------------------------------------------+
| PWM | on-chip | PWM |
+-----------+------------+------------------------------------------+
Other hardware features are not currently supported by Zephyr.
The default configuration can be found in the Kconfig file
:zephyr_file:`boards/adafruit/itsybitsy_m4_express/adafruit_itsybitsy_m4_express_defconfig`.
Zephyr can use the default Cortex-M SYSTICK timer or the SAM0 specific RTC.
To use the RTC, set :code:`CONFIG_CORTEX_M_SYSTICK=n` and set
:code:`CONFIG_SYS_CLOCK_TICKS_PER_SEC` to no more than 32 kHZ divided by 7,
i.e. no more than 4500.
Connections and IOs
===================
The `Adafruit Learning System`_ has detailed information about
the board including `pinouts`_ and the `schematic`_.
System Clock
============
The SAMD51 MCU is configured to use the 32 kHz internal oscillator
with the on-chip PLL generating the 120 MHz system clock.
Serial Port
===========
The SAMD51 MCU has 6 SERCOM based USARTs. On the ItsyBitsy, SERCOM3 is
the Zephyr console and is available on pins 0 (RX) and 1 (TX).
SPI Port
========
The SAMD51 MCU has 6 SERCOM based SPIs. On the ItsyBitsy, SERCOM1 can be put
into SPI mode and used to connect to devices over the SCK (SCLK), MO (MOSI), and
MI (MISO) pins.
PWM
===
The SAMD51 has three PWM generators with up to six channels each. :code:`TCC_0`
has a resolution of 24 bits and all other generators are 16 bit. :code:`TCC_1`
pin 2 is mapped to PA18 (D7) and pin 3 is mapped to PA19 (D9).
USB Device Port
===============
The SAMD51 MCU has a USB device port that can be used to communicate
with a host PC. See the :ref:`usb-samples` sample applications for
more, such as the :zephyr:code-sample:`usb-cdc-acm` sample which sets up a virtual
serial port that echos characters back to the host PC.
Programming and Debugging
*************************
The ItsyBitsy ships with a the BOSSA compatible UF2 bootloader. The
bootloader can be entered by quickly tapping the reset button twice.
Additionally, if :code:`CONFIG_USB_CDC_ACM` is enabled then the bootloader
will be entered automatically when you run :code:`west flash`.
Flashing
========
#. Build the Zephyr kernel and the :ref:`hello_world` sample application:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_itsybitsy_m4_express
:goals: build
:compact:
#. Connect the ItsyBitsy to your host computer using USB
#. Connect a 3.3 V USB to serial adapter to the board and to the
host. See the `Serial Port`_ section above for the board's pin
connections.
#. Run your favorite terminal program to listen for output. Under Linux the
terminal should be :code:`/dev/ttyUSB0`. For example:
.. code-block:: console
$ minicom -D /dev/ttyUSB0 -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
#. Tap the reset button twice quickly to enter bootloader mode
#. Flash the image:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_itsybitsy_m4_express
:goals: flash
:compact:
You should see "Hello World! adafruit_itsybitsy_m4_express" in your terminal.
Debugging
=========
In addition to the built-in bootloader, the ItsyBitsy can be flashed and
debugged using a SWD probe such as the Segger J-Link.
#. Connect the board to the probe by connecting the :code:`SWCLK`,
:code:`SWDIO`, :code:`RESET`, :code:`GND`, and :code:`3V3` pins on the
ItsyBitsy to the :code:`SWCLK`, :code:`SWDIO`, :code:`RESET`, :code:`GND`,
and :code:`VTref` pins on the `J-Link`_.
#. Flash the image:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_itsybitsy_m4_express
:goals: flash
:flash-args: -r openocd
:compact:
#. Start debugging:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_itsybitsy_m4_express
:goals: debug
:compact:
References
**********
.. target-notes::
.. _Adafruit Learning System:
path_to_url
.. _pinouts:
path_to_url
.. _schematic:
path_to_url
.. _J-Link:
path_to_url
``` | /content/code_sandbox/boards/adafruit/itsybitsy_m4_express/doc/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,700 |
```unknown
/*
*
*/
/dts-v1/;
#include <atmel/samd21.dtsi>
#include <atmel/samx2xx18.dtsi>
#include "adafruit_trinket_m0-pinctrl.dtsi"
#include <zephyr/dt-bindings/led/led.h>
/ {
model = "Adafruit Trinket M0";
compatible = "adafruit,trinket-m0", "atmel,samd21e18a", "atmel,samd21";
chosen {
zephyr,console = &sercom0;
zephyr,shell-uart = &sercom0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &code_partition;
};
/* These aliases are provided for compatibility with samples */
aliases {
led0 = &led0;
pwm-led0 = &pwm_led0;
led-strip = &led1;
};
leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <&porta 10 0>;
label = "LED";
};
};
pwmleds {
compatible = "pwm-leds";
pwm_led0: pwm_led_0 {
pwms = <&tcc0 2 PWM_MSEC(20)>;
};
};
};
&cpu0 {
clock-frequency = <48000000>;
};
&sercom0 {
status = "okay";
compatible = "atmel,sam0-uart";
current-speed = <115200>;
rxpo = <3>;
txpo = <1>;
pinctrl-0 = <&sercom0_uart_default>;
pinctrl-names = "default";
};
&sercom2 {
status = "okay";
compatible = "atmel,sam0-uart";
current-speed = <115200>;
rxpo = <1>;
txpo = <0>;
pinctrl-0 = <&sercom2_uart_default>;
pinctrl-names = "default";
};
/* Drives the on-board DotStar LED */
&sercom1 {
status = "okay";
compatible = "atmel,sam0-spi";
dipo = <2>;
dopo = <0>;
#address-cells = <1>;
#size-cells = <0>;
pinctrl-0 = <&sercom1_spi_default>;
pinctrl-names = "default";
led1: apa102@0 {
compatible = "apa,apa102";
reg = <0>;
spi-max-frequency = <24000000>;
chain-length = <1>;
color-mapping = <LED_COLOR_ID_BLUE
LED_COLOR_ID_GREEN
LED_COLOR_ID_RED>;
};
};
&tcc0 {
status = "okay";
compatible = "atmel,sam0-tcc-pwm";
/* Gives a maximum period of 1.4 s */
prescaler = <4>;
#pwm-cells = <2>;
pinctrl-0 = <&pwm_default>;
pinctrl-names = "default";
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "uf2";
reg = <0x00000000 0x2000>;
read-only;
};
code_partition: partition@2000 {
label = "code";
reg = <0x2000 0x3A000>;
read-only;
};
/*
* The final 16 KiB is reserved for the application.
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@3c000 {
label = "storage";
reg = <0x0003c000 0x00004000>;
};
};
};
zephyr_udc0: &usb0 {
status = "okay";
pinctrl-0 = <&usb_dc_default>;
pinctrl-names = "default";
};
``` | /content/code_sandbox/boards/adafruit/trinket_m0/adafruit_trinket_m0.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 915 |
```unknown
# Enable MPU
CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
# enable uart driver
CONFIG_SERIAL=y
# enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
``` | /content/code_sandbox/boards/adafruit/feather_nrf52840/adafruit_feather_nrf52840_express_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 42 |
```unknown
/*
*
*/
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "feather_connector.dtsi"
#include "adafruit_feather_nrf52840-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,ieee802154 = &ieee802154;
};
leds {
compatible = "gpio-leds";
led0: led_0 {
label = "Red LED";
};
led1: led_1 {
gpios = <&gpio1 10 0>;
label = "Blue LED";
};
};
buttons {
compatible = "gpio-keys";
button0: button_0 {
gpios = <&gpio1 2 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "Push button switch";
zephyr,code = <INPUT_KEY_0>;
};
};
vbatt {
compatible = "voltage-divider";
io-channels = <&adc 5>;
output-ohms = <100000>;
full-ohms = <(100000 + 100000)>;
};
/* These aliases are provided for compatibility with samples */
aliases {
led0 = &led0;
led1 = &led1;
sw0 = &button0;
watchdog0 = &wdt0;
};
};
®1 {
regulator-initial-mode = <NRF5X_REG_MODE_DCDC>;
};
&adc {
status = "okay";
};
&uicr {
gpio-as-nreset;
};
&gpiote {
status = "okay";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&uart0 {
compatible = "nordic,nrf-uart";
current-speed = <115200>;
status = "okay";
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
};
&i2c0 {
compatible = "nordic,nrf-twi";
status = "okay";
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
};
&spi1 {
compatible = "nordic,nrf-spi";
status = "okay";
pinctrl-0 = <&spi1_default>;
pinctrl-1 = <&spi1_sleep>;
pinctrl-names = "default", "sleep";
};
&qspi {
status = "okay";
pinctrl-0 = <&qspi_default>;
pinctrl-1 = <&qspi_sleep>;
pinctrl-names = "default", "sleep";
gd25q16: gd25q16@0 {
compatible = "nordic,qspi-nor";
reg = <0>;
writeoc = "pp4o";
readoc = "read4io";
sck-frequency = <16000000>;
jedec-id = [ c8 40 15 ];
size = <16777216>;
has-dpd;
t-enter-dpd = <20000>;
t-exit-dpd = <20000>;
quad-enable-requirements = "S2B1v1";
};
};
&ieee802154 {
status = "okay";
};
zephyr_udc0: &usbd {
compatible = "nordic,nrf-usbd";
status = "okay";
};
``` | /content/code_sandbox/boards/adafruit/feather_nrf52840/adafruit_feather_nrf52840_common.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 812 |
```cmake
board_runner_args(jlink "--device=nRF52840_xxAA" "--speed=4000")
board_runner_args(pyocd "--target=nrf52840" "--frequency=4000000")
if(CONFIG_BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE)
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
endif()
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
``` | /content/code_sandbox/boards/adafruit/feather_nrf52840/board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 127 |
```unknown
# Adafruit Feather nRF52840 Express board configuration
config BOARD_ADAFRUIT_FEATHER_NRF52840_EXPRESS
select SOC_NRF52840_QIAA
``` | /content/code_sandbox/boards/adafruit/feather_nrf52840/Kconfig.adafruit_feather_nrf52840_express | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 38 |
```restructuredtext
.. _adafruit_trinket_m0:
Adafruit Trinket M0
###################
Overview
********
The Adafruit Trinket M0 is a tiny (27 mm x 15 mm) ARM development
board with an onboard RGB LED, USB port, and range of I/O broken out
onto 5 pins.
.. image:: img/adafruit_trinket_m0.jpg
:align: center
:alt: Adafruit Trinket M0
Hardware
********
- ATSAMD21E18A ARM Cortex-M0+ processor at 48 MHz
- 256 KiB flash memory and 32 KiB of RAM
- Internal trimmed 8 MHz oscillator
- A user LED
- An RGB DotStar LED
- Native USB port
- One reset button
Supported Features
==================
The adafruit_trinket_m0 board configuration supports the following hardware
features:
+-----------+------------+------------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+==========================================+
| NVIC | on-chip | nested vector interrupt controller |
+-----------+------------+------------------------------------------+
| Flash | on-chip | Can be used with LittleFS to store files |
+-----------+------------+------------------------------------------+
| SYSTICK | on-chip | systick |
+-----------+------------+------------------------------------------+
| WDT | on-chip | Watchdog |
+-----------+------------+------------------------------------------+
| GPIO | on-chip | I/O ports |
+-----------+------------+------------------------------------------+
| PWM | on-chip | Pulse Width Modulation |
+-----------+------------+------------------------------------------+
| USART | on-chip | Serial ports |
+-----------+------------+------------------------------------------+
| SPI | on-chip | Serial Peripheral Interface ports |
+-----------+------------+------------------------------------------+
| USB | on-chip | USB device |
+-----------+------------+------------------------------------------+
Other hardware features are not currently supported by Zephyr.
The default configuration can be found in the Kconfig file
:zephyr_file:`boards/adafruit/trinket_m0/adafruit_trinket_m0_defconfig`.
Connections and IOs
===================
The `Adafruit Trinket M0 Learn site`_ has detailed information about
the board including `pinouts`_ and the `schematic`_.
System Clock
============
The SAMD21 MCU is configured to use the 8 MHz internal oscillator
with the on-chip PLL generating the 48 MHz system clock. The internal
APB and GCLK unit are set up in the same way as the upstream Arduino
libraries.
Serial Port
===========
The SAMD21 MCU has 6 SERCOM based USARTs. On the Trinket, SERCOM0 is
the Zephyr console and is available on pins 3 (RX) and 4 (TX).
SERCOM2 is available on pins 2 (RX) and 0 (TX).
PWM
===
The SAMD21 MCU has 3 TCC based PWM units with up to 4 outputs each and a period
of 24 bits or 16 bits. If :code:`CONFIG_PWM_SAM0_TCC` is enabled then LED0 is
driven by TCC0 instead of by GPIO.
SPI Port
========
The SAMD21 MCU has 6 SERCOM based SPIs. On the Trinket, SERCOM1 is
used to drive the DotStar RGB LED. SERCOM0 can be put into SPI mode
and used to connect to devices over pin 2 (MISO), pin 4 (MOSI), and
pin 3 (SCK).
USB Device Port
===============
The SAMD21 MCU has a USB device port that can be used to communicate
with a host PC. See the :ref:`usb-samples` sample applications for
more, such as the :zephyr:code-sample:`usb-cdc-acm` sample which sets up a virtual
serial port that echos characters back to the host PC.
Programming and Debugging
*************************
The Trinket M0 ships the BOSSA compatible UF2 bootloader. The
bootloader can be entered by quickly tapping the reset button twice.
Additionally, if :code:`CONFIG_USB_CDC_ACM` is enabled then the bootloader
will be entered automatically when you run :code:`west flash`.
Flashing
========
#. Build the Zephyr kernel and the :ref:`hello_world` sample application:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_trinket_m0
:goals: build
:compact:
#. Connect the Trinket M0 to your host computer using USB
#. Connect a 3.3 V USB to serial adapter to the board and to the
host. See the `Serial Port`_ section above for the board's pin
connections.
#. 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
#. Tap the reset button twice quickly to enter bootloader mode
#. Flash the image:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_trinket_m0
:goals: flash
:compact:
You should see "Hello World! adafruit_trinket_m0" in your terminal.
References
**********
.. target-notes::
.. _Adafruit Trinket M0 Learn site:
path_to_url
.. _pinouts:
path_to_url
.. _schematic:
path_to_url
``` | /content/code_sandbox/boards/adafruit/trinket_m0/doc/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,302 |
```unknown
# Adafruit Feather nRF52840 Express board configuration
config BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE
select SOC_NRF52840_QIAA
``` | /content/code_sandbox/boards/adafruit/feather_nrf52840/Kconfig.adafruit_feather_nrf52840_sense | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 38 |
```unknown
/*
*
*/
/dts-v1/;
#include "adafruit_feather_nrf52840_common.dtsi"
/ {
model = "Adafruit Feather nRF52840 Sense";
compatible = "adafruit,feather_nrf52840-sense";
chosen {
zephyr,console = &cdc_acm_uart0;
zephyr,shell-uart = &cdc_acm_uart0;
zephyr,uart-mcumgr = &cdc_acm_uart0;
zephyr,bt-mon-uart = &cdc_acm_uart0;
zephyr,bt-c2h-uart = &cdc_acm_uart0;
zephyr,code-partition = &code_partition;
};
leds {
led0: led_0 {
gpios = <&gpio1 9 0>;
};
};
};
&i2c0 {
SHT3XD: sht3xd@44 {
compatible = "sensirion,sht3xd";
reg = <0x44>;
};
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/* To enable flashing with UF2 bootloader, we
* must reserve a partition for SoftDevice.
* See path_to_url
* introducing-the-adafruit-nrf52840-feather?view=all#hathach-memory-map
*/
reserved_partition_0: partition@0 {
label = "SoftDevice";
reg = <0x000000000 DT_SIZE_K(152)>;
};
code_partition: partition@26000 {
label = "Application";
reg = <0x00026000 DT_SIZE_K(796)>;
};
/*
* The flash starting at 0x000ed000 and ending at
* 0x000f4000 is reserved for use by the application.
*/
storage_partition: partition@ed000 {
label = "storage";
reg = <0x0000ed000 DT_SIZE_K(28)>;
};
boot_partition: partition@f4000 {
label = "UF2";
reg = <0x000f4000 DT_SIZE_K(48)>;
};
};
};
zephyr_udc0: &usbd {
cdc_acm_uart0: cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart";
};
};
``` | /content/code_sandbox/boards/adafruit/feather_nrf52840/adafruit_feather_nrf52840_sense.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 551 |
```unknown
/*
*
*/
/dts-v1/;
#include "adafruit_feather_nrf52840_common.dtsi"
/ {
model = "Adafruit Feather nRF52840 Express";
compatible = "adafruit,feather_nrf52840-express";
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,code-partition = &slot0_partition;
};
leds {
led0: led_0 {
gpios = <&gpio1 15 0>;
};
};
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 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/NFFS/NVS if enabled. */
storage_partition: partition@f8000 {
label = "storage";
reg = <0x000f8000 0x00008000>;
};
};
};
``` | /content/code_sandbox/boards/adafruit/feather_nrf52840/adafruit_feather_nrf52840_express.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 457 |
```cmake
# Suppress "unique_unit_address_if_enabled" to handle the following overlaps:
# - power@40000000 & clock@40000000 & bprot@40000000
# - acl@4001e000 & flash-controller@4001e000
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
``` | /content/code_sandbox/boards/adafruit/feather_nrf52840/pre_dt_board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 72 |
```yaml
boards:
- name: adafruit_feather_nrf52840_express
vendor: adafruit
socs:
- name: nrf52840
- name: adafruit_feather_nrf52840_sense
vendor: adafruit
socs:
- name: nrf52840
``` | /content/code_sandbox/boards/adafruit/feather_nrf52840/board.yml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 71 |
```unknown
# Adafruit Feather nRF52840 Express board configuration
if (BOARD_ADAFRUIT_FEATHER_NRF52840_EXPRESS || BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE)
config BT_CTLR
default BT
if BOARD_SERIAL_BACKEND_CDC_ACM
config USB_DEVICE_STACK
default y
config USB_CDC_ACM
default SERIAL
config UART_CONSOLE
default CONSOLE
config USB_DEVICE_INITIALIZE_AT_BOOT
default y if CONSOLE
config SHELL_BACKEND_SERIAL_CHECK_DTR
default SHELL
depends on UART_LINE_CTRL
config UART_LINE_CTRL
default SHELL
config USB_DEVICE_REMOTE_WAKEUP
default n
if LOG
# Logger cannot use itself to log
config USB_CDC_ACM_LOG_LEVEL
default 0
# Set USB log level to error only
config USB_DEVICE_LOG_LEVEL
default 1
# Wait 1500ms at startup for logging
config LOG_PROCESS_THREAD_STARTUP_DELAY_MS
default 1500
endif # LOG
endif # BOARD_SERIAL_BACKEND_CDC_ACM
endif # BOARD_ADAFRUIT_FEATHER_NRF52840_EXPRESS || BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE
``` | /content/code_sandbox/boards/adafruit/feather_nrf52840/Kconfig.defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 251 |
```unknown
/*
*/
&pinctrl {
uart0_default: uart0_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 25)>,
<NRF_PSEL(UART_RX, 0, 24)>;
};
};
uart0_sleep: uart0_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 25)>,
<NRF_PSEL(UART_RX, 0, 24)>;
low-power-enable;
};
};
i2c0_default: i2c0_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 12)>,
<NRF_PSEL(TWIM_SCL, 0, 11)>;
};
};
i2c0_sleep: i2c0_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 12)>,
<NRF_PSEL(TWIM_SCL, 0, 11)>;
low-power-enable;
};
};
spi1_default: spi1_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 14)>,
<NRF_PSEL(SPIM_MOSI, 0, 13)>,
<NRF_PSEL(SPIM_MISO, 0, 15)>;
};
};
spi1_sleep: spi1_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 14)>,
<NRF_PSEL(SPIM_MOSI, 0, 13)>,
<NRF_PSEL(SPIM_MISO, 0, 15)>;
low-power-enable;
};
};
qspi_default: qspi_default {
group1 {
psels = <NRF_PSEL(QSPI_SCK, 0, 19)>,
<NRF_PSEL(QSPI_IO0, 0, 17)>,
<NRF_PSEL(QSPI_IO1, 0, 22)>,
<NRF_PSEL(QSPI_IO2, 0, 23)>,
<NRF_PSEL(QSPI_IO3, 0, 21)>,
<NRF_PSEL(QSPI_CSN, 0, 20)>;
};
};
qspi_sleep: qspi_sleep {
group1 {
psels = <NRF_PSEL(QSPI_SCK, 0, 19)>,
<NRF_PSEL(QSPI_IO0, 0, 17)>,
<NRF_PSEL(QSPI_IO1, 0, 22)>,
<NRF_PSEL(QSPI_IO2, 0, 23)>,
<NRF_PSEL(QSPI_IO3, 0, 21)>,
<NRF_PSEL(QSPI_CSN, 0, 20)>;
low-power-enable;
};
};
};
``` | /content/code_sandbox/boards/adafruit/feather_nrf52840/adafruit_feather_nrf52840-pinctrl.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 672 |
```unknown
# Adafruit Feather nRF52840 Express board configuration
if BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE
config BOARD_SERIAL_BACKEND_CDC_ACM
bool "USB CDC"
default y
endif # BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE
``` | /content/code_sandbox/boards/adafruit/feather_nrf52840/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 61 |
```yaml
identifier: adafruit_feather_nrf52840_sense
name: Adafruit Feather nRF52840 Sense
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- adc
- usb_device
- usb_cdc
- ble
- watchdog
- counter
- feather_serial
- feather_i2c
- feather_spi
vendor: adafruit
``` | /content/code_sandbox/boards/adafruit/feather_nrf52840/adafruit_feather_nrf52840_sense.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 106 |
```unknown
/*
*
*/
/ {
feather_header: connector {
compatible = "adafruit-feather-header";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map = <0 0 &gpio0 4 0>, /* A0 */
<1 0 &gpio0 5 0>, /* A1 */
<2 0 &gpio0 30 0>, /* A2 */
<3 0 &gpio0 28 0>, /* A3 */
<4 0 &gpio0 2 0>, /* A4 */
<5 0 &gpio0 3 0>, /* A5 */
<6 0 &gpio0 14 0>, /* SCK */
<7 0 &gpio0 13 0>, /* MOSI */
<8 0 &gpio0 15 0>, /* MISO */
<9 0 &gpio0 24 0>, /* RXD */
<10 0 &gpio0 25 0>, /* TXD */
<11 0 &gpio0 10 0>, /* D2 (NFC2) */
<12 0 &gpio0 12 0>, /* SDA */
<13 0 &gpio0 11 0>, /* SCL */
<14 0 &gpio1 8 0>, /* D5 */
<15 0 &gpio0 7 0>, /* D6 */
<16 0 &gpio0 26 0>, /* D9 */
<17 0 &gpio0 27 0>, /* D10 */
<18 0 &gpio0 6 0>, /* D11 */
<19 0 &gpio0 8 0>, /* D12 */
<20 0 &gpio1 9 0>; /* D13 */
};
};
feather_serial: &uart0 {};
feather_i2c: &i2c0 {};
feather_spi: &spi1 {};
``` | /content/code_sandbox/boards/adafruit/feather_nrf52840/feather_connector.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 480 |
```yaml
identifier: adafruit_feather_nrf52840_express
name: Adafruit Feather nRF52840 Express
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- adc
- usb_device
- ble
- watchdog
- counter
- feather_serial
- feather_i2c
- feather_spi
vendor: adafruit
``` | /content/code_sandbox/boards/adafruit/feather_nrf52840/adafruit_feather_nrf52840_express.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 100 |
```unknown
# Enable MPU
CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
# enable uart driver
CONFIG_SERIAL=y
# enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
# 32kHz clock source
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y
# enable bossac
CONFIG_BOOTLOADER_BOSSA=y
CONFIG_BOOTLOADER_BOSSA_ADAFRUIT_UF2=y
# Build UF2 by default, supported by the Adafruit nRF52 Bootloader
CONFIG_BUILD_OUTPUT_UF2=y
``` | /content/code_sandbox/boards/adafruit/feather_nrf52840/adafruit_feather_nrf52840_sense_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 130 |
```unknown
config BOARD_ADAFRUIT_FEATHER_STM32F405
select SOC_STM32F405XX
``` | /content/code_sandbox/boards/adafruit/feather_stm32f405/Kconfig.adafruit_feather_stm32f405 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 25 |
```cmake
board_runner_args(dfu-util "--pid=0483:df11" "--alt=0" "--dfuse")
board_runner_args(jlink "--device=STM32F405RG" "--speed=4000")
include(${ZEPHYR_BASE}/boards/common/dfu-util.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
``` | /content/code_sandbox/boards/adafruit/feather_stm32f405/board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 97 |
```unknown
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
# enable GPIO
CONFIG_GPIO=y
# Enable Clocks
CONFIG_CLOCK_CONTROL=y
# enable pin controller
CONFIG_PINCTRL=y
``` | /content/code_sandbox/boards/adafruit/feather_stm32f405/adafruit_feather_stm32f405_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 69 |
```restructuredtext
.. _adafruit_feather_nrf52840:
Adafruit Feather nRF52840 (Express, Sense)
##########################################
Overview
********
The Adafruit Feather nRF52840 provides support for 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:`USB (Universal Serial Bus)`
* :abbr:`WDT (Watchdog Timer)`
.. tabs::
.. group-tab:: Express
.. figure:: img/adafruit_feather_nrf52840_express.jpg
:align: center
:alt: Adafruit Feather nRF52840 Express
.. group-tab:: Sense
.. figure:: img/adafruit_feather_nrf52840_sense.jpg
:align: center
:alt: Adafruit Feather nRF52840 Sense
Hardware
********
- nRF52840 ARM Cortex-M4F processor at 64 MHz
- 1 MB flash memory and 256 KB of SRAM
- Battery connector and charger for 3.7 V lithium polymer batteries
- Charging indicator LED
- 2 User LEDs
- 1 NeoPixel LED
- Reset button
- SWD connector (Express only)
- SWD solder pads on bottom of PCB (Sense only)
- LSM6DS33 Accel/Gyro (Sense only)
- LIS3MDL magnetometer (Sense only)
- APDS9960 Proximity, Light, Color, and Gesture Sensor (Sense only)
- MP34DT01-M PDM Microphone sound sensor (Sense only)
- SHT3X Humidity sensor (Sense only)
- BMP280 temperature and barometric pressure/altitude (Sense only)
Supported Features
==================
The Adafruit Feather 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 | 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 |
+-----------+------------+----------------------+
| SPI | on-chip | spi |
+-----------+------------+----------------------+
| UART | on-chip | serial |
+-----------+------------+----------------------+
| USB | on-chip | usb |
+-----------+------------+----------------------+
| WDT | on-chip | watchdog |
+-----------+------------+----------------------+
Other hardware features have not been enabled yet for this board.
Connections and IOs
===================
.. tabs::
.. group-tab:: Express
The `Adafruit Feather nRF52840 Express Learn site`_ has
detailed information about the board including
`pinouts (Express)`_ and the `schematic (Express)`_.
.. group-tab:: Sense
The `Adafruit Feather nRF52840 Sense Learn site`_ has
detailed information about the board including
`pinouts (Sense)`_ and the `schematic (Sense)`_.
LED
---
* LED0 (red) = P1.15 (Express)
* LED0 (red) = P1.9 (Sense)
* LED1 (blue) = P1.10
Push buttons
------------
* SWITCH = P1.02
* RESET = P0.18
Programming and Debugging
*************************
Flashing
========
Flashing Zephyr onto the ``adafruit_feather_nrf52480_express`` board is possible
using an external programmer. The programmer is attached to the SWD header.
The Feather nRF52840 ships with the `Adafruit nRF52 Bootloader`_ which
supports flashing using `UF2`_. This allows easy flashing of new images,
but does not support debugging the device.
#. Build the Zephyr kernel and the :zephyr:code-sample:`blinky` sample application.
.. tabs::
.. group-tab:: Express
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: adafruit_feather_nrf52840_express/nrf52840
:goals: build
:compact:
.. group-tab:: Sense
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: adafruit_feather_nrf52840_sense/nrf52840
:goals: build
:compact:
#. If using UF2, connect the board to your host computer using USB.
#. Tap the reset button twice quickly to enter bootloader mode.
A mass storage device named `FTHR840BOOT` for (Express) or
`FTHRSNSBOOT` (Sense) should appear on the host. Ensure this is
mounted.
#. Flash the image.
.. tabs::
.. group-tab:: Sense
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: adafruit_feather_nrf52840_sense
:goals: flash
:compact:
#. You should see the red LED blink.
References
**********
.. target-notes::
.. _Adafruit Feather nRF52840 Express Learn site:
path_to_url
.. _pinouts (Express):
path_to_url
.. _schematic (Express):
path_to_url
.. _Adafruit Feather nRF52840 Sense Learn site:
path_to_url
.. _pinouts (Sense):
path_to_url
.. _schematic (Sense):
path_to_url
.. _Adafruit nRF52 Bootloader:
path_to_url
.. _UF2:
path_to_url
``` | /content/code_sandbox/boards/adafruit/feather_nrf52840/doc/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,514 |
```unknown
/*
*
*/
/dts-v1/;
#include <st/f4/stm32f405Xg.dtsi>
#include <st/f4/stm32f405rgtx-pinctrl.dtsi>
#include "feather_connector.dtsi"
/ {
model = "Adafruit Feather STM32F405 Express";
compatible = "adafruit,adafruit_feather_stm32f405", "st,stm32f405";
chosen {
zephyr,console = &usart3;
zephyr,shell-uart = &usart3;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,ccm = &ccm0;
};
leds {
compatible = "gpio-leds";
led: led {
gpios = <&gpioc 1 GPIO_ACTIVE_HIGH>;
label = "User LED";
};
};
aliases {
led0 = &led;
};
};
&clk_lsi {
status = "okay";
};
&clk_hse {
clock-frequency = <DT_FREQ_M(12)>;
status = "okay";
};
&pll {
div-m = <12>;
mul-n = <336>;
div-p = <2>;
div-q = <7>;
clocks = <&clk_hse>;
status = "okay";
};
&rcc {
clocks = <&pll>;
clock-frequency = <DT_FREQ_M(168)>;
ahb-prescaler = <1>;
apb1-prescaler = <4>;
apb2-prescaler = <2>;
};
&usart3 {
pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>;
pinctrl-names = "default";
current-speed = <115200>;
status = "okay";
};
&i2c1 {
pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>;
pinctrl-names = "default";
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
};
&spi1_nss_pa15 { slew-rate = "very-high-speed"; };
&spi1 {
pinctrl-0 = <&spi1_nss_pa15 &spi1_sck_pb3
&spi1_miso_pb4 &spi1_mosi_pb5>;
pinctrl-names = "default";
status = "okay";
cs-gpios = <&gpioa 15 GPIO_ACTIVE_LOW>;
gd25q16: gd25q16c@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <80000000>;
size = <0x200000>;
has-dpd;
t-enter-dpd = <20000>;
t-exit-dpd = <100000>;
jedec-id = [c8 40 15];
};
};
&spi2 {
pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>;
pinctrl-names = "default";
status = "okay";
};
&rtc {
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>,
<&rcc STM32_SRC_LSI RTC_SEL(2)>;
status = "okay";
};
zephyr_udc0: &usbotg_fs {
pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>;
pinctrl-names = "default";
status = "okay";
};
``` | /content/code_sandbox/boards/adafruit/feather_stm32f405/adafruit_feather_stm32f405.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 773 |
```yaml
board:
name: adafruit_feather_stm32f405
vendor: adafruit
socs:
- name: stm32f405xx
``` | /content/code_sandbox/boards/adafruit/feather_stm32f405/board.yml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 36 |
```yaml
identifier: adafruit_feather_stm32f405
name: Adafruit Feather STM32F405 Express
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
ram: 128
flash: 1024
supported:
- i2c
- spi
- usb
- feather_serial
- feather_i2c
- feather_spi
vendor: adafruit
``` | /content/code_sandbox/boards/adafruit/feather_stm32f405/adafruit_feather_stm32f405.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 103 |
```ini
source [find interface/stlink.cfg]
transport select hla_swd
source [find target/stm32f4x.cfg]
reset_config srst_only
$_TARGETNAME configure -event gdb-attach {
echo "Debugger attaching: halting execution"
reset halt
gdb_breakpoint_override hard
}
$_TARGETNAME configure -event gdb-detach {
echo "Debugger detaching: resuming execution"
resume
}
``` | /content/code_sandbox/boards/adafruit/feather_stm32f405/support/openocd.cfg | ini | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 88 |
```unknown
/*
*
*/
/ {
feather_header: connector {
compatible = "adafruit-feather-header";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map = <0 0 &gpioa 4 0>, /* A0 */
<1 0 &gpioa 5 0>, /* A1 */
<2 0 &gpioa 6 0>, /* A2 */
<3 0 &gpioa 7 0>, /* A3 */
<4 0 &gpioc 4 0>, /* A4 */
<5 0 &gpioc 5 0>, /* A5 */
<6 0 &gpiob 13 0>, /* SCK */
<7 0 &gpiob 15 0>, /* MOSI */
<8 0 &gpiob 14 0>, /* MISO */
<9 0 &gpiob 11 0>, /* RX */
<10 0 &gpiob 10 0>, /* TX */
<11 0 &gpioa 8 0>, /* B0 (NC) */
<12 0 &gpiob 7 0>, /* SDA */
<13 0 &gpiob 6 0>, /* SCL */
<14 0 &gpioc 7 0>, /* D5 */
<15 0 &gpioc 6 0>, /* D6 */
<16 0 &gpiob 8 0>, /* D9 */
<17 0 &gpiob 9 0>, /* D10 */
<18 0 &gpioc 3 0>, /* D11 */
<19 0 &gpioc 2 0>, /* D12 */
<20 0 &gpioc 1 0>; /* D13 */
};
};
feather_serial: &usart3 {};
feather_i2c: &i2c1 {};
feather_spi: &spi2 {};
``` | /content/code_sandbox/boards/adafruit/feather_stm32f405/feather_connector.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 493 |
```unknown
/*
*
*/
/ {
pro_micro: connector {
compatible = "sparkfun,pro-micro";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map
= <1 0 &gpio0 0 0> /* D1 */
, <0 0 &gpio0 1 0> /* D0 */
, <2 0 &gpio0 2 0> /* D2 */
, <3 0 &gpio0 3 0> /* D3 */
, <4 0 &gpio0 4 0> /* D4/A6 */
, <5 0 &gpio0 5 0> /* D5 */
, <6 0 &gpio0 6 0> /* D6/A7 */
, <7 0 &gpio0 7 0> /* D7 */
, <8 0 &gpio0 8 0> /* D8/A8 */
, <9 0 &gpio0 9 0> /* D9/A9 */
, <10 0 &gpio0 10 0> /* D10/A10 */
, <16 0 &gpio0 19 0> /* D16 */
, <14 0 &gpio0 20 0> /* D14 */
, <15 0 &gpio0 18 0> /* D15 */
, <18 0 &gpio0 26 0> /* D18/A0 */
, <19 0 &gpio0 27 0> /* D19/A1 */
, <20 0 &gpio0 28 0> /* D20/A2 */
, <21 0 &gpio0 29 0> /* D21/A3 */
;
};
};
pro_micro_i2c: &i2c1 {};
pro_micro_spi: &spi0 {};
pro_micro_serial: &uart0 {};
``` | /content/code_sandbox/boards/adafruit/kb2040/sparkfun_pro_micro_connector.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 490 |
```cmake
board_runner_args(uf2 "--board-id=RPI-RP2")
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
``` | /content/code_sandbox/boards/adafruit/kb2040/board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 34 |
```unknown
config BOARD_ADAFRUIT_KB2040
select SOC_RP2040
``` | /content/code_sandbox/boards/adafruit/kb2040/Kconfig.adafruit_kb2040 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 20 |
```restructuredtext
.. _adafruit_feather_stm32f405:
Adafruit Feather STM32F405 Express
##################################
Overview
********
The Adafruit Feather STM32F405 is an ARM Development board in the
Feather standard layout, sharing peripheral placement with other
devices labeled as Feathers or FeatherWings. The board is equipped
with a lithium ion battery charger, native USB C connector, 2MB of
external flash memory, and SD card socket.
.. image:: img/adafruit_feather_stm32f405.jpg
:align: center
:alt: Adafruit Feather STM32F405 Express
Hardware
********
- STM32F405 Cortex M4 with FPU and 1MB Flash, 168MHz speed
- 192KB RAM total - 128 KB RAM + 64 KB program-only/cache RAM
- USB C power and data
- LiPo connector and charger
- SD socket on the bottom, connected to SDIO port
- 2 MB SPI Flash chip
- Built in NeoPixel indicator
- I2C, UART, GPIO, ADCs, DACs
- Qwiic/STEMMA-QT connector for fast I2C connectivity
- SWD SMT mount region on board underside.
Supported Features
==================
The Adafruit Feather STM32F405 board configuration supports the
following hardware features:
+-----------+------------+----------------------+
| Interface | Controller | Driver/Component |
+===========+============+======================+
| NVIC | on-chip | nested vectored |
| | | interrupt controller |
+-----------+------------+----------------------+
| SYSTICK | on-chip | system clock |
+-----------+------------+----------------------+
| UART | on-chip | serial port |
+-----------+------------+----------------------+
| GPIO | on-chip | gpio |
+-----------+------------+----------------------+
| I2C | on-chip | i2c |
+-----------+------------+----------------------+
| SPI | on-chip | spi |
+-----------+------------+----------------------+
| USB | on-chip | USB device |
+-----------+------------+----------------------+
Other hardware features have not been enabled yet for this board.
Connections and IOs
===================
The `Adafruit Feather STM32F405 Express Learn site`_ has detailed
information about the board including `pinouts`_ and the `schematic`_.
System Clock
============
The STM32F405 is configured to use the 12MHz HSE Oscillator to produce
a 168MHz system clock.
Serial Port
===========
The STM32F405 UART 3 peripheral is available on the TX (PB10) and RX
(PB11) pins.
I2C Port
========
The STM32F405 I2C1 peripheral is available on the SDA (PB7) and SCL
(PB6) pins.
SPI Port
========
The STM32F405 SPI2 peripheral is available on the SCK (PB13), MI
(PB14) and MO (PB15) pins.
SPI1 uses SCK (PB3), MI (PB4), MO (PB5) and SS (PA15) pins and is
dedicated to the 2 MB SPI Flash chip.
Programming and Debugging
*************************
DFU-Util programming is supported through Zephyr by default. Set up
of the built in DFU-Util bootloader is possible by following the
`instructions on the Learn website`_.
Flashing
========
#. Build the Zephyr kernel and the :zephyr:code-sample:`blinky` sample application:
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: adafruit_feather_stm32f405
:goals: build
:compact:
#. On the Adafruit Feather STM32F405, connect the 3.3V pin to the B0 boot pin
with a jumper wire.
#. Flash the image:
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: adafruit_feather_stm32f405
:goals: flash
:compact:
You should see the D13 LED blinking.
References
**********
.. target-notes::
.. _Adafruit Feather STM32F405 Express Learn site:
path_to_url
.. _pinouts:
path_to_url
.. _schematic:
path_to_url
.. _instructions on the Learn website:
path_to_url
``` | /content/code_sandbox/boards/adafruit/feather_stm32f405/doc/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 975 |
```unknown
/*
*/
#include <dt-bindings/pinctrl/rpi-pico-rp2040-pinctrl.h>
&pinctrl {
uart0_default: uart0_default {
group1 {
pinmux = <UART0_TX_P0>;
};
group2 {
pinmux = <UART0_RX_P1>;
input-enable;
};
};
i2c1_default: i2c1_default {
group1 {
pinmux = <I2C1_SDA_P2>;
input-enable;
};
group2 {
pinmux = <I2C1_SCL_P3>;
input-enable;
};
};
spi0_default: spi0_default {
group1 {
pinmux = <SPI0_TX_P19>;
};
group2 {
pinmux = <SPI0_RX_P20>;
input-enable;
};
group3 {
pinmux = <SPI0_SCK_P18>;
};
};
adc_default: adc_default {
group1 {
pinmux = <ADC_CH0_P26>, <ADC_CH1_P27>, <ADC_CH2_P28>, <ADC_CH3_P29>;
input-enable;
};
};
clocks_default: clocks_default {
};
ws2812_pio0_default: ws2812_pio0_default {
ws2812 {
pinmux = <PIO0_P17>;
};
};
};
``` | /content/code_sandbox/boards/adafruit/kb2040/adafruit_kb2040-pinctrl.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 321 |
```yaml
board:
name: adafruit_kb2040
vendor: adafruit
socs:
- name: rp2040
``` | /content/code_sandbox/boards/adafruit/kb2040/board.yml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 30 |
```unknown
if BOARD_ADAFRUIT_KB2040
config RP2_FLASH_W25Q080
default y
if I2C_DW
config I2C_DW_CLOCK_SPEED
default 125
endif # I2C_DW
config USB_SELF_POWERED
default n
endif # BOARD_ADAFRUIT_KB2040
``` | /content/code_sandbox/boards/adafruit/kb2040/Kconfig.defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 74 |
```unknown
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=125000000
# Enable UART driver
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
# Enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
# Enable reset by default
CONFIG_RESET=y
# Enable clock control by default
CONFIG_CLOCK_CONTROL=y
# Code partition needed to target the correct flash range
CONFIG_USE_DT_CODE_PARTITION=y
# Output UF2 by default, native bootloader supports it.
CONFIG_BUILD_OUTPUT_UF2=y
``` | /content/code_sandbox/boards/adafruit/kb2040/adafruit_kb2040_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 105 |
```yaml
identifier: adafruit_kb2040
name: Adafruit KB2040
type: mcu
arch: arm
flash: 8192
ram: 264
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- uart
- gpio
- adc
- i2c
- spi
- hwinfo
- watchdog
- pwm
- flash
- dma
- counter
- clock
``` | /content/code_sandbox/boards/adafruit/kb2040/adafruit_kb2040.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 111 |
```unknown
/*
*
*/
/dts-v1/;
#include <rpi_pico/rp2040.dtsi>
#include "adafruit_kb2040-pinctrl.dtsi"
#include "sparkfun_pro_micro_connector.dtsi"
#include <freq.h>
#include <zephyr/dt-bindings/led/led.h>
/ {
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,flash-controller = &ssi;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,code-partition = &code_partition;
};
aliases {
watchdog0 = &wdt0;
led-strip = &ws2812;
};
};
&flash0 {
reg = <0x10000000 DT_SIZE_M(8)>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/* Reserved memory for the second stage bootloader */
second_stage_bootloader: partition@0 {
label = "second_stage_bootloader";
reg = <0x00000000 0x100>;
read-only;
};
/*
* Usable flash. Starts at 0x100, after the bootloader. The partition
* size is 8MB minus the 0x100 bytes taken by the bootloader.
*/
code_partition: partition@100 {
label = "code";
reg = <0x100 (DT_SIZE_M(8) - 0x100)>;
read-only;
};
};
};
&clocks {
pinctrl-0 = <&clocks_default>;
pinctrl-names = "default";
};
&uart0 {
current-speed = <115200>;
status = "okay";
pinctrl-0 = <&uart0_default>;
pinctrl-names = "default";
};
&spi0 {
status = "okay";
pinctrl-0 = <&spi0_default>;
pinctrl-names = "default";
clock-frequency = <DT_FREQ_M(8)>;
};
&i2c1 {
status = "okay";
pinctrl-0 = <&i2c1_default>;
pinctrl-names = "default";
clock-frequency = <I2C_BITRATE_FAST>;
};
&gpio0 {
status = "okay";
};
&wdt0 {
status = "okay";
};
&adc {
status = "okay";
pinctrl-0 = <&adc_default>;
pinctrl-names = "default";
};
&pio0 {
status = "okay";
pio-ws2812 {
compatible = "worldsemi,ws2812-rpi_pico-pio";
status = "okay";
pinctrl-0 = <&ws2812_pio0_default>;
pinctrl-names = "default";
bit-waveform = <3>, <3>, <4>;
ws2812: ws2812 {
status = "okay";
gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
chain-length = <1>;
color-mapping = <LED_COLOR_ID_GREEN
LED_COLOR_ID_RED
LED_COLOR_ID_BLUE>;
reset-delay = <280>;
frequency = <800000>;
};
};
};
zephyr_udc0: &usbd {
status = "okay";
};
&vreg {
regulator-always-on;
regulator-allowed-modes = <REGULATOR_RPI_PICO_MODE_NORMAL>;
};
``` | /content/code_sandbox/boards/adafruit/kb2040/adafruit_kb2040.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 770 |
```cmake
#
include(${ZEPHYR_BASE}/boards/common/bossac.board.cmake)
``` | /content/code_sandbox/boards/adafruit/feather_m0_basic_proto/board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 19 |
```unknown
config BOARD_ADAFRUIT_FEATHER_M0_BASIC_PROTO
select SOC_SAMD21G18A
``` | /content/code_sandbox/boards/adafruit/feather_m0_basic_proto/Kconfig.adafruit_feather_m0_basic_proto | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 24 |
```yaml
identifier: adafruit_feather_m0_basic_proto
name: Adafruit Feather M0 Basic Proto
type: mcu
arch: arm
ram: 32
flash: 232
toolchain:
- zephyr
- gnuarmemb
- xtools
vendor: adafruit
``` | /content/code_sandbox/boards/adafruit/feather_m0_basic_proto/adafruit_feather_m0_basic_proto.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 67 |
```unknown
CONFIG_SOC_ATMEL_SAMD_XOSC32K=y
CONFIG_SOC_ATMEL_SAMD_XOSC32K_AS_MAIN=y
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
``` | /content/code_sandbox/boards/adafruit/feather_m0_basic_proto/adafruit_feather_m0_basic_proto_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 57 |
```cmake
# Suppress "unique_unit_address_if_enabled" to handle the following overlaps:
# - /soc/pinmux@41004400 & /soc/gpio@41004400
# - /soc/pinmux@41004480 & /soc/gpio@41004480
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
``` | /content/code_sandbox/boards/adafruit/feather_m0_basic_proto/pre_dt_board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 74 |
```yaml
board:
name: adafruit_feather_m0_basic_proto
vendor: adafruit
socs:
- name: samd21g18a
``` | /content/code_sandbox/boards/adafruit/feather_m0_basic_proto/board.yml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 36 |
```restructuredtext
.. _adafruit_kb2040:
Adafruit KB2040
###############
Overview
********
The Adafruit KB2040 is a small, low-cost, versatile board from
Adafruit. It is equipped with an RP2040 SoC, an on-board RGB Neopixel,
a USB connector, and a STEMMA QT connector. The USB bootloader allows
it to be flashed without any adapter, in a drag-and-drop manner.
Hardware
********
- Dual core Arm Cortex-M0+ processor running up to 133MHz
- 264KB on-chip SRAM
- 8MB on-board QSPI flash with XIP capabilities
- 18 GPIO pins
- 4 Analog inputs
- 1 UART peripherals
- 1 SPI controllers
- 2 I2C controllers (one via STEMMA QT connector)
- 16 PWM channels
- USB 1.1 controller (host/device)
- 8 Programmable I/O (PIO) for custom peripherals
- On-board RGB LED
- 1 Watchdog timer peripheral
.. figure:: img/kb2040.jpg
:align: center
:alt: Adafruit KB2040
Adafruit KB2040 (Image courtesy of Adafruit)
Supported Features
==================
The adafruit_kb2040 board configuration supports the following
hardware features:
.. list-table::
:header-rows: 1
* - Peripheral
- Kconfig option
- Devicetree compatible
* - NVIC
- N/A
- :dtcompatible:`arm,v6m-nvic`
* - UART
- :kconfig:option:`CONFIG_SERIAL`
- :dtcompatible:`raspberrypi,pico-uart`
* - GPIO
- :kconfig:option:`CONFIG_GPIO`
- :dtcompatible:`raspberrypi,pico-gpio`
* - ADC
- :kconfig:option:`CONFIG_ADC`
- :dtcompatible:`raspberrypi,pico-adc`
* - I2C
- :kconfig:option:`CONFIG_I2C`
- :dtcompatible:`snps,designware-i2c`
* - SPI
- :kconfig:option:`CONFIG_SPI`
- :dtcompatible:`raspberrypi,pico-spi`
* - USB Device
- :kconfig:option:`CONFIG_USB_DEVICE_STACK`
- :dtcompatible:`raspberrypi,pico-usbd`
* - HWINFO
- :kconfig:option:`CONFIG_HWINFO`
- N/A
* - Watchdog Timer (WDT)
- :kconfig:option:`CONFIG_WATCHDOG`
- :dtcompatible:`raspberrypi,pico-watchdog`
* - PWM
- :kconfig:option:`CONFIG_PWM`
- :dtcompatible:`raspberrypi,pico-pwm`
* - Flash
- :kconfig:option:`CONFIG_FLASH`
- :dtcompatible:`raspberrypi,pico-flash`
* - Clock controller
- :kconfig:option:`CONFIG_CLOCK_CONTROL`
- :dtcompatible:`raspberrypi,pico-clock-controller`
* - UART (PIO)
- :kconfig:option:`CONFIG_SERIAL`
- :dtcompatible:`raspberrypi,pico-uart-pio`
Pin Mapping
===========
The peripherals of the RP2040 SoC can be routed to various pins on the board.
The configuration of these routes can be modified through DTS. Please refer to
the datasheet to see the possible routings for each peripheral.
Default Zephyr Peripheral Mapping:
----------------------------------
.. rst-class:: rst-columns
- UART0_TX : P0
- UART0_RX : P1
- I2C1_SDA : P2
- I2C1_SCL : P3
- SPI0_RX : P20
- SPI0_SCK : P18
- SPI0_TX : P19
Programming and Debugging
*************************
Flashing
========
Using UF2
---------
Since it doesn't expose the SWD pins, you must flash the Adafruit KB2040 with
a UF2 file. By default, building an app for this board will generate a
`build/zephyr/zephyr.uf2` file. If the KB2040 is powered on with the `BOOTSEL`
button pressed, it will appear on the host as a mass storage device. The
UF2 file should be drag-and-dropped to the device, which will flash the KB2040.
.. target-notes::
.. _Getting Started with Raspberry Pi Pico:
path_to_url
.. _Primary Guide\: Adafruit KB2040:
path_to_url
``` | /content/code_sandbox/boards/adafruit/kb2040/doc/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,003 |
```unknown
/*
*/
#include <dt-bindings/pinctrl/samd21-da1gXabcd-pinctrl.h>
&pinctrl {
sercom3_i2c_default: sercom3_i2c_default {
group1 {
pinmux = <PA22C_SERCOM3_PAD0>,
<PA23C_SERCOM3_PAD1>;
};
};
sercom4_spi_default: sercom4_spi_default {
group1 {
pinmux = <PA12D_SERCOM4_PAD0>,
<PB10D_SERCOM4_PAD2>,
<PB11D_SERCOM4_PAD3>;
};
};
sercom0_uart_default: sercom0_uart_default {
group1 {
pinmux = <PA11C_SERCOM0_PAD3>,
<PA10C_SERCOM0_PAD2>;
};
};
usb_dc_default: usb_dc_default {
group1 {
pinmux = <PA25G_USB_DP>,
<PA24G_USB_DM>;
};
};
};
``` | /content/code_sandbox/boards/adafruit/feather_m0_basic_proto/adafruit_feather_m0_basic_proto-pinctrl.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 226 |
```unknown
/*
*
*/
feather_i2c: &sercom3 {};
``` | /content/code_sandbox/boards/adafruit/feather_m0_basic_proto/feather_connector.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 15 |
```unknown
/*
*
*/
/dts-v1/;
#include <atmel/samd21.dtsi>
#include <atmel/samx2xx18.dtsi>
#include "adafruit_feather_m0_basic_proto-pinctrl.dtsi"
#include "feather_connector.dtsi"
/ {
model = "Adafruit Feather M0 Basic Proto";
compatible = "adafruit,feather-m0-basic-proto", "atmel,samd21g18a",
"atmel,samd21";
chosen {
zephyr,console = &sercom0;
zephyr,shell-uart = &sercom0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &code_partition;
};
/* These aliases are provided for compatibility with samples */
aliases {
led0 = &led0;
};
leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <&porta 17 0>;
label = "LED";
};
};
};
&cpu0 {
clock-frequency = <48000000>;
};
&sercom0 {
status = "okay";
compatible = "atmel,sam0-uart";
current-speed = <115200>;
rxpo = <3>;
txpo = <1>;
pinctrl-0 = <&sercom0_uart_default>;
pinctrl-names = "default";
};
&sercom3 {
status = "okay";
compatible = "atmel,sam0-i2c";
clock-frequency = <I2C_BITRATE_FAST>;
#address-cells = <1>;
#size-cells = <0>;
pinctrl-0 = <&sercom3_i2c_default>;
pinctrl-names = "default";
};
&sercom4 {
status = "okay";
compatible = "atmel,sam0-spi";
#address-cells = <1>;
#size-cells = <0>;
dipo = <0>;
dopo = <1>;
pinctrl-0 = <&sercom4_spi_default>;
pinctrl-names = "default";
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "sam-ba";
reg = <0x00000000 DT_SIZE_K(8)>;
read-only;
};
code_partition: partition@2000 {
label = "code";
reg = <0x2000 DT_SIZE_K(232)>;
read-only;
};
/*
* The final 16 KiB is reserved for the application.
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@3c000 {
label = "storage";
reg = <0x0003c000 DT_SIZE_K(16)>;
};
};
};
zephyr_udc0: &usb0 {
status = "okay";
pinctrl-0 = <&usb_dc_default>;
pinctrl-names = "default";
};
``` | /content/code_sandbox/boards/adafruit/feather_m0_basic_proto/adafruit_feather_m0_basic_proto.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 706 |
```unknown
/*
*/
&pinctrl {
uart0_default: uart0_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 6)>,
<NRF_PSEL(UART_RX, 0, 8)>;
};
};
uart0_sleep: uart0_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 6)>,
<NRF_PSEL(UART_RX, 0, 8)>;
low-power-enable;
};
};
i2c0_default: i2c0_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 25)>,
<NRF_PSEL(TWIM_SCL, 0, 26)>;
};
};
i2c0_sleep: i2c0_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 25)>,
<NRF_PSEL(TWIM_SCL, 0, 26)>;
low-power-enable;
};
};
pwm0_default: pwm0_default {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 17)>,
<NRF_PSEL(PWM_OUT1, 0, 19)>;
};
};
pwm0_sleep: pwm0_sleep {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 17)>,
<NRF_PSEL(PWM_OUT1, 0, 19)>;
low-power-enable;
};
};
};
``` | /content/code_sandbox/boards/adafruit/nrf52_adafruit_feather/nrf52_adafruit_feather-pinctrl.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 372 |
```cmake
board_runner_args(jlink "--device=nRF52832_xxAA" "--speed=4000")
board_runner_args(pyocd "--target=nrf52832" "--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)
``` | /content/code_sandbox/boards/adafruit/nrf52_adafruit_feather/board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 93 |
```restructuredtext
.. _adafruit_feather_m0_basic_proto:
Adafruit Feather M0 Basic Proto
###############################
Overview
********
The Adafruit Feather M0 Basic Proto is a thin, light ARM development
board with an onboard battery connector and charger for 3.7 V lithium
polymer batteries, charging status indicator and user LEDs, native USB
connector, 20 I/O pins, and a small prototyping area.
.. image:: img/adafruit_feather_m0_basic_proto.jpg
:align: center
:alt: Adafruit Feather M0 Basic Proto
Hardware
********
- ATSAMD21G18A ARM Cortex-M0+ processor at 48 MHz
- 32.768 kHz crystal oscillator
- 256 KiB flash memory and 32 KiB of RAM
- Battery connector and charger for 3.7 V lithium polymer batteries
- Charging indicator LED
- User LED
- Reset button
- Native USB port
Supported Features
==================
The adafruit_feather_m0_basic_proto board configuration supports the
following hardware features:
+-----------+------------+------------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+==========================================+
| NVIC | on-chip | Nested vector interrupt controller |
+-----------+------------+------------------------------------------+
| Flash | on-chip | Can be used with LittleFS to store files |
+-----------+------------+------------------------------------------+
| SYSTICK | on-chip | Systick |
+-----------+------------+------------------------------------------+
| WDT | on-chip | Watchdog |
+-----------+------------+------------------------------------------+
| GPIO | on-chip | I/O ports |
+-----------+------------+------------------------------------------+
| USART | on-chip | Serial port |
+-----------+------------+------------------------------------------+
| I2C | on-chip | Inter-Integrated Circuit |
+-----------+------------+------------------------------------------+
| SPI | on-chip | Serial Peripheral Interface port |
+-----------+------------+------------------------------------------+
| USB | on-chip | USB device |
+-----------+------------+------------------------------------------+
Other hardware features are not currently supported by Zephyr.
The default configuration can be found in the Kconfig file
:zephyr_file:`boards/adafruit/feather_m0_basic_proto/adafruit_feather_m0_basic_proto_defconfig`.
Connections and IOs
===================
The `Adafruit Feather M0 Basic Proto Learn site`_ has detailed
information about the board including `pinouts`_ and the `schematic`_.
System Clock
============
The SAMD21 MCU is configured to use the 32.768 kHz external oscillator
with the on-chip PLL generating the 48 MHz system clock.
Serial Port
===========
The SAMD21 MCU has 6 SERCOM based USARTs. On the Adafruit Feather M0
Basic Proto, SERCOM0 is the Zephyr console and is available on pins 0
(RX) and 1 (TX).
I2C Port
========
The SAMD21 MCU has 6 SERCOM based USARTs. On the Adafruit Feather M0
Basic Proto, SERCOM3 is available on pin 20 (SDA) and pin 21 (SCL).
SPI Port
========
The SAMD21 MCU has 6 SERCOM based SPIs. On the Adafruit Feather M0
Basic Proto, SERCOM4 is available on pin 22 (MISO), pin 23 (MOSI), and
pin 24 (SCK).
USB Device Port
===============
The SAMD21 MCU has a USB device port that can be used to communicate
with a host PC. See the :ref:`usb-samples` sample applications for
more, such as the :zephyr:code-sample:`usb-cdc-acm` sample which sets up a virtual
serial port that echos characters back to the host PC.
Programming and Debugging
*************************
The Adafruit Feather M0 Basic Proto ships with a BOSSA compatible
SAM-BA bootloader. The bootloader can be entered by quickly tapping
the reset button twice.
Flashing
========
#. Build the Zephyr kernel and the :ref:`hello_world` sample application:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_feather_m0_basic_proto
:goals: build
:compact:
#. Connect the Adafruit Feather M0 Basic Proto to your host computer
using USB
#. Connect a 3.3 V USB to serial adapter to the board and to the
host. See the `Serial Port`_ section above for the board's pin
connections.
#. 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
#. Tap the reset button twice quickly to enter bootloader mode
#. Flash the image:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adafruit_feather_m0_basic_proto
:goals: flash
:compact:
You should see "Hello World! adafruit_feather_m0_basic_proto" in your terminal.
References
**********
.. target-notes::
.. _Adafruit Feather M0 Basic Proto Learn site:
path_to_url
.. _pinouts:
path_to_url
.. _schematic:
path_to_url
``` | /content/code_sandbox/boards/adafruit/feather_m0_basic_proto/doc/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,247 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.