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 |
|---|---|---|---|---|---|---|---|---|
```unknown
# nRF9160 innblue V2.2 board configuration
config BOARD_INNBLUE22
select SOC_NRF9160_SICA
``` | /content/code_sandbox/boards/innblue/innblue22/Kconfig.innblue22 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 31 |
```unknown
# Enable MPU
CONFIG_ARM_MPU=y
# Enable TrustZone-M
CONFIG_ARM_TRUSTZONE_M=y
# This Board implies building Non-Secure firmware
CONFIG_TRUSTED_EXECUTION_NONSECURE=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/innblue/innblue22/innblue22_nrf9160_ns_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 77 |
```restructuredtext
.. _tlsr9518adk80d:
Telink TLSR9518ADK80D
#####################
Overview
********
The TLSR9518A Generic Starter Kit is a hardware platform which
can be used to verify the `Telink TLSR951x series chipset`_ and develop applications
for several 2.4 GHz air interface standards including Bluetooth 5.2 (Basic data
rate, Enhanced data rate, LE, Indoor positioning and BLE Mesh),
Zigbee 3.0, Homekit, 6LoWPAN, Thread and 2.4 Ghz proprietary.
.. figure:: img/tlsr9518adk80d.jpg
:align: center
:alt: TLSR9518ADK80D
More information about the board can be found at the `Telink B91 Generic Starter Kit Hardware Guide`_ website.
Hardware
********
The TLSR9518A SoC integrates a powerful 32-bit RISC-V MCU, DSP, AI Engine, 2.4 GHz ISM Radio, 256
KB SRAM (128 KB of Data Local Memory and 128 KB of Instruction Local Memory), external Flash memory,
stereo audio codec, 14 bit AUX ADC, analog and digital Microphone input, PWM, flexible IO interfaces,
and other peripheral blocks required for advanced IoT, hearable, and wearable devices.
.. figure:: img/tlsr9518_block_diagram.jpg
:align: center
:alt: TLSR9518ADK80D_SOC
The TLSR9518ADK80D default board configuration provides the following hardware components:
- RF conducted antenna
- 1 MB External Flash memory with reset button
- Chip reset button
- Mini USB interface
- 4-wire JTAG
- 4 LEDs, Key matrix up to 4 keys
- 2 line-in function (Dual Analog microphone supported when switching jumper from microphone path)
- Dual Digital microphone
- Stereo line-out
Supported Features
==================
The Zephyr TLSR9518ADK80D board configuration supports the following hardware features:
+----------------+------------+------------------------------+
| Interface | Controller | Driver/Component |
+================+============+==============================+
| PLIC | on-chip | interrupt_controller |
+----------------+------------+------------------------------+
| RISC-V Machine | on-chip | timer |
| Timer (32 KHz) | | |
+----------------+------------+------------------------------+
| PINCTRL | on-chip | pinctrl |
+----------------+------------+------------------------------+
| GPIO | on-chip | gpio |
+----------------+------------+------------------------------+
| UART | on-chip | serial |
+----------------+------------+------------------------------+
| PWM | on-chip | pwm |
+----------------+------------+------------------------------+
| TRNG | on-chip | entropy |
+----------------+------------+------------------------------+
| FLASH (MSPI) | on-chip | flash |
+----------------+------------+------------------------------+
| RADIO | on-chip | Bluetooth, |
| | | ieee802154, OpenThread |
+----------------+------------+------------------------------+
| SPI (Master) | on-chip | spi |
+----------------+------------+------------------------------+
| I2C (Master) | on-chip | i2c |
+----------------+------------+------------------------------+
| ADC | on-chip | adc |
+----------------+------------+------------------------------+
.. note::
To support "button" example project PC3-KEY3 (J20-19, J20-20) jumper needs to be removed and KEY3 (J20-19) should be connected to VDD3_DCDC (J51-13) externally.
For the rest example projects use the default jumpers configuration.
Other hardware features and example projects are not supported yet.
Limitations
-----------
- Maximum 3 GPIO pins could be configured to generate interrupts simultaneously. All pins must be related to different ports and use different IRQ numbers.
- DMA mode is not supported by I2C, SPI and Serial Port.
- UART hardware flow control is not implemented.
- SPI Slave mode is not implemented.
- I2C Slave mode is not implemented.
Default configuration and IOs
=============================
System Clock
------------
The TLSR9518ADK80D board is configured to use the 24 MHz external crystal oscillator
with the on-chip PLL/DIV generating the 48 MHz system clock.
The following values also could be assigned to the system clock in the board DTS file
:zephyr_file:`boards/telink/tlsr9518adk80d/tlsr9518adk80d.dts`:
- 16000000
- 24000000
- 32000000
- 48000000
- 64000000
- 96000000
.. code-block::
&cpu0 {
clock-frequency = <48000000>;
};
PINs Configuration
------------------
The TLSR9518A SoC has five GPIO controllers (PORT_A to PORT_E), but only two are
currently enabled (PORT_B for LEDs control and PORT_C for buttons) in the board DTS file:
- LED0 (blue): PB4, LED1 (green): PB5, LED2 (white): PB6, LED3 (red): PB7
- Key Matrix SW0: PC2_PC3, SW1: PC2_PC1, SW2: PC0_PC3, SW3: PC0_PC1
Peripheral's pins on the SoC are mapped to the following GPIO pins in the
:zephyr_file:`boards/telink/tlsr9518adk80d/tlsr9518adk80d.dts` file:
- UART0 TX: PB2, RX: PB3
- UART1 TX: PC6, RX: PC7
- PWM Channel 0: PB4
- PSPI CS0: PC4, CLK: PC5, MISO: PC6, MOSI: PC7
- HSPI CS0: PA1, CLK: PA2, MISO: PA3, MOSI: PA4
- I2C SCL: PE1, SDA: PE3
Serial Port
-----------
The TLSR9518A SoC has 2 UARTs. The Zephyr console output is assigned to UART0.
The default settings are 115200 8N1.
Programming and debugging
*************************
Building
========
.. important::
These instructions assume you've set up a development environment as
described in the :ref:`getting_started`.
To build applications using the defaultRISC-V toolchain from Zephyr SDK, just run the west build command.
Here is an example for the "hello_world" application.
.. code-block:: console
# From the root of the zephyr repository
west build -b tlsr9518adk80d samples/hello_world
To use `Telink RISC-V Linux Toolchain`_, ``ZEPHYR_TOOLCHAIN_VARIANT`` and ``CROSS_COMPILE`` variables need to be set.
In addition ``CONFIG_FPU=y`` must be selected in :zephyr_file:`boards/telink/tlsr9518adk80d/tlsr9518adk80d_defconfig` file since this
toolchain is compatible only with the float point unit usage.
.. code-block:: console
# Set Zephyr toolchain variant to cross-compile
export ZEPHYR_TOOLCHAIN_VARIANT=cross-compile
# Specify the Telink RISC-V Toolchain location
export CROSS_COMPILE=~/toolchains/nds32le-elf-mculib-v5f/bin/riscv32-elf-
# From the root of the zephyr repository
west build -b tlsr9518adk80d samples/hello_world
`Telink RISC-V Linux Toolchain`_ is available on the `Burning and Debugging Tools for TLSR9 Series in Linux`_ page.
Open a serial terminal with the following settings:
- Speed: 115200
- Data: 8 bits
- Parity: None
- Stop bits: 1
Flash the board, reset and observe the following messages on the selected
serial port:
.. code-block:: console
*** Booting Zephyr OS version 2.5.0 ***
Hello World! tlsr9518adk80d
Flashing
========
To flash the TLSR9518ADK80D board see the sources below:
- `Burning and Debugging Tools for all Series`_
- `Burning and Debugging Tools for TLSR9 Series`_
- `Burning and Debugging Tools for TLSR9 Series in Linux`_
It is also possible to use the west flash command, but additional steps are required to set it up:
- Download `Telink RISC-V Linux Toolchain`_. The toolchain contains tools for the board flashing as well.
- Since the ICEman tool is created for the 32-bit OS version it is necessary to install additional packages in case of the 64-bit OS version.
.. code-block:: console
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y libc6:i386 libncurses5:i386 libstdc++6:i386
- Run the "ICEman.sh" script.
.. code-block:: console
# From the root of the {path to the Telink RISC-V Linux Toolchain}/ice repository
sudo ./ICEman.sh
- Now you should be able to run the west flash command with the toolchain path specified (TELINK_TOOLCHAIN_PATH).
.. code-block:: console
west flash --telink-tools-path=$TELINK_TOOLCHAIN_PATH
- You can also run the west flash command without toolchain path specification if add SPI_burn and ICEman to PATH.
.. code-block:: console
export PATH=$TELINK_TOOLCHAIN_PATH/flash/bin:"$PATH"
export PATH=$TELINK_TOOLCHAIN_PATH/ice:"$PATH"
Debugging
=========
This port supports UART debug and OpenOCD+GDB. The `west debug` command also supported. You may run
it in a simple way, like:
.. code-block:: console
west debug
Or with additional arguments, like:
.. code-block:: console
west debug --gdb-port=<port_number> --gdb-ex=<additional_ex_arguments>
Example:
.. code-block:: console
west debug --gdb-port=1111 --gdb-ex="-ex monitor reset halt -ex b main -ex continue"
References
**********
.. target-notes::
.. _Telink TLSR951x series chipset: path_to_url
.. _Telink B91 Generic Starter Kit Hardware Guide: path_to_url
.. _Telink RISC-V Linux Toolchain: path_to_url
.. _Burning and Debugging Tools for all Series: path_to_url
.. _Burning and Debugging Tools for TLSR9 Series: path_to_url
.. _Burning and Debugging Tools for TLSR9 Series in Linux: path_to_url
``` | /content/code_sandbox/boards/telink/tlsr9518adk80d/doc/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,375 |
```unknown
/*
*
*/
/*
* Default Flash planning for nRF9160_innblue22.
*
* Zephyr build for nRF9160 with ARM TrustZone-M support,
* implies building Secure and Non-Secure Zephyr images.
*
* Secure image will be placed, by default, in flash0
* (or in slot0, if MCUboot is present).
* Secure image will use sram0 for system memory.
*
* Non-Secure image will be placed in slot0_ns, and use
* sram0_ns for system memory.
*
* Note that the Secure image only requires knowledge of
* the beginning of the Non-Secure image (not its size).
*/
&slot0_partition {
reg = <0x00010000 0x40000>;
};
&slot0_ns_partition {
reg = <0x00050000 0x30000>;
};
&slot1_partition {
reg = <0x00080000 0x40000>;
};
&slot1_ns_partition {
reg = <0x000c0000 0x30000>;
};
/* Default SRAM planning when building for nRF9160 with
* ARM TrustZone-M support
* - Lowest 64 kB SRAM allocated to Secure image (sram0).
* - 64 kB SRAM reserved for and used by the BSD socket
* library.
* - Upper 128 kB allocated to Non-Secure image (sram0_ns).
*/
&sram0 {
reg = <0x20000000 DT_SIZE_K(64)>;
};
&sram0_bsd {
reg = <0x20010000 DT_SIZE_K(64)>;
};
&sram0_ns {
reg = <0x20020000 DT_SIZE_K(128)>;
};
``` | /content/code_sandbox/boards/innblue/innblue22/innblue22_partition_conf.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 366 |
```unknown
/*
*
*/
#include "innblue22_common-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {
model = "innblue v22 Dev Kit";
compatible = "innblue,innblue22";
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
};
leds {
compatible = "gpio-leds";
red_led: led_1 {
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
label = "RGB red channel";
};
green_led: led_2 {
gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
label = "RGB green channel";
};
blue_led: led_3 {
gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
label = "RGB blue channel";
};
mode_led: led_4 {
gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
label = "mode red channel";
};
};
buttons {
compatible = "gpio-keys";
button0: button_0 {
gpios = <&gpio0 31 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "Button 0";
zephyr,code = <INPUT_KEY_0>;
};
};
en_5v0_boost: enable-5v0-boost {
compatible = "regulator-fixed";
regulator-name = "en_5v0_boost";
enable-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
startup-delay-us = <10000>;
regulator-boot-on;
};
/* These aliases are provided for compatibility with samples */
aliases {
led0 = &red_led;
led1 = &green_led;
led2 = &blue_led;
led3 = &mode_led;
sw0 = &button0;
rgb-pwm = &pwm0;
mode-pwm = &pwm1;
watchdog0 = &wdt0;
accel0 = &lis2dh12_accel;
};
};
&gpiote {
status = "okay";
};
&gpio0 {
status = "okay";
};
&uart0 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
};
&uart1 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart1_default>;
pinctrl-1 = <&uart1_sleep>;
pinctrl-names = "default", "sleep";
};
&uart2 {
current-speed = <115200>;
pinctrl-0 = <&uart2_default>;
pinctrl-1 = <&uart2_sleep>;
pinctrl-names = "default", "sleep";
};
&i2c2 {
compatible = "nordic,nrf-twim";
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
pinctrl-0 = <&i2c2_default>;
pinctrl-1 = <&i2c2_sleep>;
pinctrl-names = "default", "sleep";
bq27421@55 {
compatible = "ti,bq274xx";
reg = <0x55>;
design-voltage = <3700>;
design-capacity = <1800>;
taper-current = <45>;
terminate-voltage = <3000>;
};
lis2dh12_accel: lis2dh12-accel@19 {
compatible = "st,lis2dh";
reg = <0x19>;
irq-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>, <&gpio0 1 GPIO_ACTIVE_HIGH>;
};
hts221@5f {
compatible = "st,hts221";
reg = <0x5f>;
drdy-gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
};
lps22hb-press@5c {
compatible = "st,lps22hb-press";
reg = <0x5c>;
};
ccs811: ccs811@5a {
compatible = "ams,ccs811";
reg = <0x5a>;
};
bme680@76 {
compatible = "bosch,bme680";
reg = <0x76>;
};
};
&pwm0 {
status = "okay";
pinctrl-0 = <&pwm0_default>;
pinctrl-1 = <&pwm0_sleep>;
pinctrl-names = "default", "sleep";
};
&pwm1 {
status = "okay";
pinctrl-0 = <&pwm1_default>;
pinctrl-1 = <&pwm1_sleep>;
pinctrl-names = "default", "sleep";
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x10000>;
};
slot0_partition: partition@10000 {
label = "image-0";
};
slot0_ns_partition: partition@50000 {
label = "image-0-nonsecure";
};
slot1_partition: partition@80000 {
label = "image-1";
};
slot1_ns_partition: partition@c0000 {
label = "image-1-nonsecure";
};
/* 0xf0000 to 0xf7fff reserved for TF-M partitions */
storage_partition: partition@f8000 {
label = "storage";
reg = <0x000f8000 0x00008000>;
};
};
};
/ {
/* SRAM allocated and used by the BSD library */
sram0_bsd: memory@20010000 {
compatible = "mmio-sram";
};
/* SRAM allocated to the Non-Secure image */
sram0_ns: memory@20020000 {
compatible = "mmio-sram";
};
};
/* Include partition configuration file */
#include "innblue22_partition_conf.dtsi"
``` | /content/code_sandbox/boards/innblue/innblue22/innblue22_common.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,413 |
```yaml
identifier: innblue22/nrf9160
name: nRF9160-INNBLUE22
type: mcu
arch: arm
toolchain:
- gnuarmemb
- xtools
- zephyr
ram: 64
flash: 256
supported:
- i2c
- pwm
- watchdog
``` | /content/code_sandbox/boards/innblue/innblue22/innblue22_nrf9160.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 78 |
```yaml
identifier: innblue22/nrf9160/ns
name: nRF9160-INNBLUE22-Non-Secure
type: mcu
arch: arm
toolchain:
- gnuarmemb
- xtools
- zephyr
ram: 128
flash: 192
supported:
- i2c
- pwm
- watchdog
``` | /content/code_sandbox/boards/innblue/innblue22/innblue22_nrf9160_ns.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 83 |
```cmake
# Suppress "unique_unit_address_if_enabled" to handle the following overlaps:
# - flash-controller@39000 & kmu@39000
# - power@5000 & clock@5000
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
``` | /content/code_sandbox/boards/innblue/innblue22/pre_dt_board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 60 |
```yaml
board:
name: innblue22
vendor: innblue
socs:
- name: nrf9160
variants:
- name: 'ns'
``` | /content/code_sandbox/boards/innblue/innblue22/board.yml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 39 |
```unknown
/*
*
*/
/dts-v1/;
#include <nordic/nrf9160ns_sica.dtsi>
#include "innblue22_common.dtsi"
/ {
chosen {
zephyr,flash = &flash0;
zephyr,sram = &sram0_ns;
zephyr,code-partition = &slot0_ns_partition;
};
};
``` | /content/code_sandbox/boards/innblue/innblue22/innblue22_nrf9160_ns.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 82 |
```unknown
/*
*
*/
/dts-v1/;
#include <nordic/nrf9160_sica.dtsi>
#include "innblue22_common.dtsi"
/ {
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
};
};
``` | /content/code_sandbox/boards/innblue/innblue22/innblue22_nrf9160.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 79 |
```unknown
/*
*/
&pinctrl {
uart0_default: uart0_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 29)>,
<NRF_PSEL(UART_RX, 0, 30)>;
};
};
uart0_sleep: uart0_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 29)>,
<NRF_PSEL(UART_RX, 0, 30)>;
low-power-enable;
};
};
uart1_default: uart1_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 14)>,
<NRF_PSEL(UART_RX, 0, 15)>;
};
};
uart1_sleep: uart1_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 14)>,
<NRF_PSEL(UART_RX, 0, 15)>;
low-power-enable;
};
};
uart2_default: uart2_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 18)>,
<NRF_PSEL(UART_RX, 0, 19)>;
};
};
uart2_sleep: uart2_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 18)>,
<NRF_PSEL(UART_RX, 0, 19)>;
low-power-enable;
};
};
i2c2_default: i2c2_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 25)>,
<NRF_PSEL(TWIM_SCL, 0, 26)>;
};
};
i2c2_sleep: i2c2_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, 5)>,
<NRF_PSEL(PWM_OUT1, 0, 6)>,
<NRF_PSEL(PWM_OUT2, 0, 7)>;
nordic,invert;
};
};
pwm0_sleep: pwm0_sleep {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 5)>,
<NRF_PSEL(PWM_OUT1, 0, 6)>,
<NRF_PSEL(PWM_OUT2, 0, 7)>;
low-power-enable;
};
};
pwm1_default: pwm1_default {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 4)>,
<NRF_PSEL(PWM_OUT1, 0, 9)>;
nordic,invert;
};
};
pwm1_sleep: pwm1_sleep {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 4)>,
<NRF_PSEL(PWM_OUT1, 0, 9)>;
low-power-enable;
};
};
};
``` | /content/code_sandbox/boards/innblue/innblue22/innblue22_common-pinctrl.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 774 |
```unknown
# nRF9160 innblue V2.2 board configuration
if BOARD_INNBLUE22
# For the secure version of the board the firmware is linked at the beginning
# of the flash, or into the code-partition defined in DT if it is intended to
# be loaded by MCUboot. If the secure firmware is to be combined with a non-
# secure image (TRUSTED_EXECUTION_SECURE=y), the secure FW image shall always
# be restricted to the size of its code partition.
# For the non-secure version of the board, the firmware
# must be linked into the code-partition (non-secure) defined in DT, regardless.
# Apply this configuration below by setting the Kconfig symbols used by
# the linker according to the information extracted from DT partitions.
# Workaround for not being able to have commas in macro arguments
DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition
if BOARD_INNBLUE22_NRF9160 && TRUSTED_EXECUTION_SECURE
config FLASH_LOAD_SIZE
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
endif # BOARD_INNBLUE22_NRF9160 && TRUSTED_EXECUTION_SECURE
if BOARD_INNBLUE22_NRF9160_NS
config FLASH_LOAD_OFFSET
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
config FLASH_LOAD_SIZE
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
endif # BOARD_INNBLUE22_NRF9160_NS
config BT_HCI_VS
default y if BT
config REGULATOR
default y if SENSOR
endif # BOARD_INNBLUE22
``` | /content/code_sandbox/boards/innblue/innblue22/Kconfig.defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 353 |
```cmake
board_runner_args(jlink "--device=nRF9160_xxAA" "--speed=4000")
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
``` | /content/code_sandbox/boards/innblue/innblue21/board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 56 |
```yaml
identifier: innblue21/nrf9160
name: nRF9160-INNBLUE21
type: mcu
arch: arm
toolchain:
- gnuarmemb
- xtools
- zephyr
ram: 64
flash: 256
supported:
- i2c
- pwm
- watchdog
``` | /content/code_sandbox/boards/innblue/innblue21/innblue21_nrf9160.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 78 |
```unknown
# nRF9160 innblue V2.1 board configuration
config BOARD_INNBLUE21
select SOC_NRF9160_SICA
``` | /content/code_sandbox/boards/innblue/innblue21/Kconfig.innblue21 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 31 |
```unknown
# Enable MPU
CONFIG_ARM_MPU=y
# Enable TrustZone-M
CONFIG_ARM_TRUSTZONE_M=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/innblue/innblue21/innblue21_nrf9160_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 56 |
```unknown
# Enable MPU
CONFIG_ARM_MPU=y
# Enable TrustZone-M
CONFIG_ARM_TRUSTZONE_M=y
# This Board implies building Non-Secure firmware
CONFIG_TRUSTED_EXECUTION_NONSECURE=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/innblue/innblue21/innblue21_nrf9160_ns_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 77 |
```yaml
identifier: innblue21/nrf9160/ns
name: nRF9160-INNBLUE21-Non-Secure
type: mcu
arch: arm
toolchain:
- gnuarmemb
- xtools
- zephyr
ram: 128
flash: 192
supported:
- i2c
- pwm
- watchdog
``` | /content/code_sandbox/boards/innblue/innblue21/innblue21_nrf9160_ns.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 83 |
```cmake
# Suppress "unique_unit_address_if_enabled" to handle the following overlaps:
# - flash-controller@39000 & kmu@39000
# - power@5000 & clock@5000
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
``` | /content/code_sandbox/boards/innblue/innblue21/pre_dt_board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 60 |
```restructuredtext
.. _nrf9160_innblue22:
nRF9160 INNBLUE22
#################
Overview
********
The nRF9160 innblue22 is a cellular IoT sensor development board, which
is based on the nRF9160 SiP, and features NB-IoT and LTE-M connectivity.
.. figure:: img/nrf9160_innblue22.jpg
:align: center
:alt: nRF9160 innblue22
nRF9160 innblue22 (Credit: innblue)
Hardware
********
The following parts are built into the board:
* Accelerometer: ST LIS2DH12
* CryptoElement: Atmel ATECC608a
* Humidity Sensor: ST HTS221
* Qi charger: TI BQ51013
* Battery fuel gauge: TI BQ27421
Supported Features
==================
The innblue22 board configuration supports the following
hardware (as of nRF9160) features:
+-----------+------------+----------------------+
| Interface | Controller | Driver/Component |
+-----------+------------+----------------------+
| CLOCK | on-chip | clock_control |
+-----------+------------+----------------------+
| FLASH | on-chip | flash |
+-----------+------------+----------------------+
| GPIO | on-chip | gpio |
+-----------+------------+----------------------+
| I2C(M) | on-chip | i2c |
+-----------+------------+----------------------+
| MPU | on-chip | arch/arm |
+-----------+------------+----------------------+
| NVIC | on-chip | arch/arm |
+-----------+------------+----------------------+
| PWM | on-chip | pwm |
+-----------+------------+----------------------+
| RTT | Segger | console |
+-----------+------------+----------------------+
| SPU | on-chip | system protection |
+-----------+------------+----------------------+
| UARTE | on-chip | serial |
+-----------+------------+----------------------+
| WDT | on-chip | watchdog |
+-----------+------------+----------------------+
Connections and IOs
===================
LED
---
* LED1 ( red ) = P0.7
* LED2 (green) = P0.6
* LED3 ( blue) = P0.5
* LED4 ( red ) = P0.4
Push buttons and Switches
-------------------------
* BUTTON1 = P0.31
Security components
===================
- Implementation Defined Attribution Unit. The IDAU is implemented
with the System Protection Unit and is used to define secure and non-secure
memory maps. By default, all of the memory space (Flash, SRAM, and
peripheral address space) is defined to be secure accessible only.
- Secure boot.
Programming and Debugging
*************************
innblue22 supports the Armv8m Security Extension, and by default boots
in the Secure state.
Building Secure/Non-Secure Zephyr applications
==============================================
The process requires the following steps:
1. Build the Secure Zephyr application using ``-DBOARD=innblue22`` and
``CONFIG_TRUSTED_EXECUTION_SECURE=y`` in the application project configuration file.
2. Build the Non-Secure Zephyr application using ``-DBOARD=innblue22/nrf9160/ns``.
3. Merge the two binaries together.
When building a Secure/Non-Secure application, the Secure application will
have to set the IDAU (SPU) configuration to allow Non-Secure access to all
CPU resources utilized by the Non-Secure application firmware. SPU
configuration shall take place before jumping to the Non-Secure application.
Building a Secure only application
==================================
Build the Zephyr app in the usual way (see :ref:`build_an_application`
and :ref:`application_run`), using ``-DBOARD=innblue22``.
Flashing
========
Follow the instructions in the :ref:`nordic_segger` page to install
and configure all the necessary software. Further information can be
found in :ref:`nordic_segger_flashing`. Then build and flash
applications as usual (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Here is an example for the :ref:`hello_world` application.
First, run your favorite terminal program to listen for output.
.. code-block:: console
$ minicom -D <tty_device> -b 115200
Replace :code:`<tty_device>` with the port where the nRF9160 innblue22
can be found. For example, under Linux, :code:`/dev/ttyACM0`.
Then build and flash the application in the usual way.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: innblue22
:goals: build flash
Debugging
=========
Refer to the :ref:`nordic_segger` page to learn about debugging Nordic boards with a
Segger IC.
``` | /content/code_sandbox/boards/innblue/innblue22/doc/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,095 |
```yaml
board:
name: innblue21
vendor: innblue
socs:
- name: nrf9160
variants:
- name: 'ns'
``` | /content/code_sandbox/boards/innblue/innblue21/board.yml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 39 |
```unknown
/*
*
*/
/dts-v1/;
#include <nordic/nrf9160_sica.dtsi>
#include "innblue21_common.dtsi"
/ {
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
};
};
``` | /content/code_sandbox/boards/innblue/innblue21/innblue21_nrf9160.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 79 |
```unknown
/*
*
*/
/*
* Default Flash planning for nRF9160_innblue21.
*
* Zephyr build for nRF9160 with ARM TrustZone-M support,
* implies building Secure and Non-Secure Zephyr images.
*
* Secure image will be placed, by default, in flash0
* (or in slot0, if MCUboot is present).
* Secure image will use sram0 for system memory.
*
* Non-Secure image will be placed in slot0_ns, and use
* sram0_ns for system memory.
*
* Note that the Secure image only requires knowledge of
* the beginning of the Non-Secure image (not its size).
*/
&slot0_partition {
reg = <0x00010000 0x40000>;
};
&slot0_ns_partition {
reg = <0x00050000 0x30000>;
};
&slot1_partition {
reg = <0x00080000 0x40000>;
};
&slot1_ns_partition {
reg = <0x000c0000 0x30000>;
};
/* Default SRAM planning when building for nRF9160 with
* ARM TrustZone-M support
* - Lowest 64 kB SRAM allocated to Secure image (sram0).
* - 64 kB SRAM reserved for and used by the BSD socket
* library.
* - Upper 128 kB allocated to Non-Secure image (sram0_ns).
*/
&sram0 {
reg = <0x20000000 DT_SIZE_K(64)>;
};
&sram0_bsd {
reg = <0x20010000 DT_SIZE_K(64)>;
};
&sram0_ns {
reg = <0x20020000 DT_SIZE_K(128)>;
};
``` | /content/code_sandbox/boards/innblue/innblue21/innblue21_partition_conf.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 366 |
```unknown
# nRF9160 innblue V2.1 board configuration
if BOARD_INNBLUE21
# For the secure version of the board the firmware is linked at the beginning
# of the flash, or into the code-partition defined in DT if it is intended to
# be loaded by MCUboot. If the secure firmware is to be combined with a non-
# secure image (TRUSTED_EXECUTION_SECURE=y), the secure FW image shall always
# be restricted to the size of its code partition.
# For the non-secure version of the board, the firmware
# must be linked into the code-partition (non-secure) defined in DT, regardless.
# Apply this configuration below by setting the Kconfig symbols used by
# the linker according to the information extracted from DT partitions.
# Workaround for not being able to have commas in macro arguments
DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition
if BOARD_INNBLUE21_NRF9160 && TRUSTED_EXECUTION_SECURE
config FLASH_LOAD_SIZE
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
endif # BOARD_INNBLUE21_NRF9160 && TRUSTED_EXECUTION_SECURE
if BOARD_INNBLUE21_NRF9160_NS
config FLASH_LOAD_OFFSET
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
config FLASH_LOAD_SIZE
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
endif # BOARD_INNBLUE21_NRF9160_NS
config BT_HCI_VS
default y if BT
config REGULATOR
default y if SENSOR
endif # BOARD_INNBLUE21
``` | /content/code_sandbox/boards/innblue/innblue21/Kconfig.defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 353 |
```unknown
/*
*
*/
#include "innblue21_common-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {
model = "innblue v21 Dev Kit";
compatible = "innblue,innblue21";
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
};
leds {
compatible = "gpio-leds";
red_led: led_1 {
gpios = <&gpio0 7 0>;
label = "RGB red channel";
};
green_led: led_2 {
gpios = <&gpio0 6 0>;
label = "RGB green channel";
};
blue_led: led_3 {
gpios = <&gpio0 5 0>;
label = "RGB blue channel";
};
mode_led: led_4 {
gpios = <&gpio0 4 0>;
label = "mode red channel";
};
};
buttons {
compatible = "gpio-keys";
button0: button_0 {
gpios = <&gpio0 31 GPIO_PULL_UP>;
label = "Button 0";
zephyr,code = <INPUT_KEY_0>;
};
};
en_3v3_sensor: enable-3v3-sensor {
compatible = "regulator-fixed";
regulator-name = "en_3v3_sensor";
enable-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
startup-delay-us = <10000>;
regulator-boot-on;
};
en_5v0_boost: enable-5v0-boost {
compatible = "regulator-fixed";
regulator-name = "en_5v0_boost";
enable-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
startup-delay-us = <10000>;
regulator-boot-on;
};
/* These aliases are provided for compatibility with samples */
aliases {
led0 = &red_led;
led1 = &green_led;
led2 = &blue_led;
led3 = &mode_led;
sw0 = &button0;
rgb-pwm = &pwm0;
mode-pwm = &pwm1;
watchdog0 = &wdt0;
accel0 = &lis2dh12_accel;
};
};
&gpiote {
status = "okay";
};
&gpio0 {
status = "okay";
};
&uart0 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
};
&uart1 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart1_default>;
pinctrl-1 = <&uart1_sleep>;
pinctrl-names = "default", "sleep";
};
&uart2 {
current-speed = <115200>;
pinctrl-0 = <&uart2_default>;
pinctrl-1 = <&uart2_sleep>;
pinctrl-names = "default", "sleep";
};
&i2c2 {
compatible = "nordic,nrf-twim";
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
pinctrl-0 = <&i2c2_default>;
pinctrl-1 = <&i2c2_sleep>;
pinctrl-names = "default", "sleep";
lis2dh12_accel: lis2dh12-accel@19 {
compatible = "st,lis2dh";
reg = <0x19>;
irq-gpios = <&gpio0 0 0>, <&gpio0 1 0>;
};
hts221@5f {
compatible = "st,hts221";
reg = <0x5f>;
drdy-gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
};
lps22hb-press@5c {
compatible = "st,lps22hb-press";
reg = <0x5c>;
};
ccs811: ccs811@5a {
compatible = "ams,ccs811";
reg = <0x5a>;
};
bme680@76 {
compatible = "bosch,bme680";
reg = <0x76>;
};
};
&pwm0 {
status = "okay";
pinctrl-0 = <&pwm0_default>;
pinctrl-1 = <&pwm0_sleep>;
pinctrl-names = "default", "sleep";
};
&pwm1 {
status = "okay";
pinctrl-0 = <&pwm1_default>;
pinctrl-1 = <&pwm1_sleep>;
pinctrl-names = "default", "sleep";
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x10000>;
};
slot0_partition: partition@10000 {
label = "image-0";
};
slot0_ns_partition: partition@50000 {
label = "image-0-nonsecure";
};
slot1_partition: partition@80000 {
label = "image-1";
};
slot1_ns_partition: partition@c0000 {
label = "image-1-nonsecure";
};
storage_partition: partition@f8000 {
label = "storage";
reg = <0x000f8000 0x00008000>;
};
};
};
/ {
/* SRAM allocated and used by the BSD library */
sram0_bsd: memory@20010000 {
compatible = "mmio-sram";
};
/* SRAM allocated to the Non-Secure image */
sram0_ns: memory@20020000 {
compatible = "mmio-sram";
};
};
/* Include partition configuration file */
#include "innblue21_partition_conf.dtsi"
``` | /content/code_sandbox/boards/innblue/innblue21/innblue21_common.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,386 |
```unknown
/*
*
*/
/dts-v1/;
#include <nordic/nrf9160ns_sica.dtsi>
#include "innblue21_common.dtsi"
/ {
chosen {
zephyr,flash = &flash0;
zephyr,sram = &sram0_ns;
zephyr,code-partition = &slot0_ns_partition;
};
};
``` | /content/code_sandbox/boards/innblue/innblue21/innblue21_nrf9160_ns.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 82 |
```unknown
/*
*/
&pinctrl {
uart0_default: uart0_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 29)>,
<NRF_PSEL(UART_RX, 0, 30)>;
};
};
uart0_sleep: uart0_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 29)>,
<NRF_PSEL(UART_RX, 0, 30)>;
low-power-enable;
};
};
uart1_default: uart1_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 14)>,
<NRF_PSEL(UART_RX, 0, 15)>;
};
};
uart1_sleep: uart1_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 14)>,
<NRF_PSEL(UART_RX, 0, 15)>;
low-power-enable;
};
};
uart2_default: uart2_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 18)>,
<NRF_PSEL(UART_RX, 0, 19)>;
};
};
uart2_sleep: uart2_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 18)>,
<NRF_PSEL(UART_RX, 0, 19)>;
low-power-enable;
};
};
i2c2_default: i2c2_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 25)>,
<NRF_PSEL(TWIM_SCL, 0, 26)>;
};
};
i2c2_sleep: i2c2_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, 5)>,
<NRF_PSEL(PWM_OUT1, 0, 6)>,
<NRF_PSEL(PWM_OUT2, 0, 7)>;
nordic,invert;
};
};
pwm0_sleep: pwm0_sleep {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 5)>,
<NRF_PSEL(PWM_OUT1, 0, 6)>,
<NRF_PSEL(PWM_OUT2, 0, 7)>;
low-power-enable;
};
};
pwm1_default: pwm1_default {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 4)>,
<NRF_PSEL(PWM_OUT1, 0, 9)>;
nordic,invert;
};
};
pwm1_sleep: pwm1_sleep {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 4)>,
<NRF_PSEL(PWM_OUT1, 0, 9)>;
low-power-enable;
};
};
};
``` | /content/code_sandbox/boards/innblue/innblue21/innblue21_common-pinctrl.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 774 |
```restructuredtext
.. _boards-mikroe:
MikroElektronika d.o.o.
#######################
.. toctree::
:maxdepth: 1
:glob:
**/*
``` | /content/code_sandbox/boards/mikroe/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 42 |
```cmake
#
#
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
``` | /content/code_sandbox/boards/mikroe/mini_m4_for_stm32/board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 20 |
```unknown
config BOARD_MIKROE_MINI_M4_FOR_STM32
select SOC_STM32F415XX
``` | /content/code_sandbox/boards/mikroe/mini_m4_for_stm32/Kconfig.mikroe_mini_m4_for_stm32 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 26 |
```yaml
identifier: mikroe_mini_m4_for_stm32
name: Mikroe MINI-M4 for STM32
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
ram: 128
flash: 1024
supported:
- uart
- gpio
- i2c
- spi
- pwm
- usb
vendor: mikroe
``` | /content/code_sandbox/boards/mikroe/mini_m4_for_stm32/mikroe_mini_m4_for_stm32.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 99 |
```yaml
board:
name: mikroe_mini_m4_for_stm32
vendor: mikroe
socs:
- name: stm32f415xx
``` | /content/code_sandbox/boards/mikroe/mini_m4_for_stm32/board.yml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 36 |
```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/mikroe/mini_m4_for_stm32/mikroe_mini_m4_for_stm32_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 68 |
```unknown
# Mikroe MINI-M4 for STM32 board configuration
if BOARD_MIKROE_MINI_M4_FOR_STM32
config SPI_STM32_INTERRUPT
default y
depends on SPI
endif # BOARD_MIKROE_MINI_M4_FOR_STM32
``` | /content/code_sandbox/boards/mikroe/mini_m4_for_stm32/Kconfig.defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 60 |
```restructuredtext
.. _nrf9160_innblue21:
nRF9160 INNBLUE21
#################
Overview
********
The nRF9160 innblue21 is a cellular IoT sensor development board, which
is based on the nRF9160 SiP, and features NB-IoT and LTE-M connectivity.
.. figure:: img/nrf9160_innblue21.jpg
:align: center
:alt: nRF9160 innblue21
nRF9160 innblue21 (Credit: innblue)
Hardware
********
The following parts are built into the board:
* Accelerometer: ST LIS2DH12
* CryptoElement: Atmel ATECC608a
* Humidity Sensor: ST HTS221
* Qi charger: TI BQ51013
* Battery fuel gauge: TI BQ27421
Supported Features
==================
The innblue21 board configuration supports the following
hardware (as of nRF9160) features:
+-----------+------------+----------------------+
| Interface | Controller | Driver/Component |
+-----------+------------+----------------------+
| CLOCK | on-chip | clock_control |
+-----------+------------+----------------------+
| FLASH | on-chip | flash |
+-----------+------------+----------------------+
| GPIO | on-chip | gpio |
+-----------+------------+----------------------+
| I2C(M) | on-chip | i2c |
+-----------+------------+----------------------+
| MPU | on-chip | arch/arm |
+-----------+------------+----------------------+
| NVIC | on-chip | arch/arm |
+-----------+------------+----------------------+
| PWM | on-chip | pwm |
+-----------+------------+----------------------+
| RTT | Segger | console |
+-----------+------------+----------------------+
| SPU | on-chip | system protection |
+-----------+------------+----------------------+
| UARTE | on-chip | serial |
+-----------+------------+----------------------+
| WDT | on-chip | watchdog |
+-----------+------------+----------------------+
Connections and IOs
===================
LED
---
* LED1 ( red ) = P0.7
* LED2 (green) = P0.6
* LED3 ( blue) = P0.5
* LED4 ( red ) = P0.4
Push buttons and Switches
-------------------------
* BUTTON1 = P0.31
Security components
===================
- Implementation Defined Attribution Unit. The IDAU is implemented
with the System Protection Unit and is used to define secure and non-secure
memory maps. By default, all of the memory space (Flash, SRAM, and
peripheral address space) is defined to be secure accessible only.
- Secure boot.
Programming and Debugging
*************************
innblue21 supports the Armv8m Security Extension, and by default boots
in the Secure state.
Building Secure/Non-Secure Zephyr applications
==============================================
The process requires the following steps:
1. Build the Secure Zephyr application using ``-DBOARD=innblue21`` and
``CONFIG_TRUSTED_EXECUTION_SECURE=y`` in the application project configuration file.
2. Build the Non-Secure Zephyr application using ``-DBOARD=innblue21/nrf9160/ns``.
3. Merge the two binaries together.
When building a Secure/Non-Secure application, the Secure application will
have to set the IDAU (SPU) configuration to allow Non-Secure access to all
CPU resources utilized by the Non-Secure application firmware. SPU
configuration shall take place before jumping to the Non-Secure application.
Building a Secure only application
==================================
Build the Zephyr app in the usual way (see :ref:`build_an_application`
and :ref:`application_run`), using ``-DBOARD=innblue21``.
Flashing
========
Follow the instructions in the :ref:`nordic_segger` page to install
and configure all the necessary software. Further information can be
found in :ref:`nordic_segger_flashing`. Then build and flash
applications as usual (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Here is an example for the :ref:`hello_world` application.
First, run your favorite terminal program to listen for output.
.. code-block:: console
$ minicom -D <tty_device> -b 115200
Replace :code:`<tty_device>` with the port where the nRF9160 innblue21
can be found. For example, under Linux, :code:`/dev/ttyACM0`.
Then build and flash the application in the usual way.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: innblue21
:goals: build flash
Debugging
=========
Refer to the :ref:`nordic_segger` page to learn about debugging Nordic boards with a
Segger IC.
``` | /content/code_sandbox/boards/innblue/innblue21/doc/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,095 |
```ini
source [find interface/stlink.cfg]
set WORKAREASIZE 0x30000
transport select hla_swd
source [find target/stm32f4x.cfg]
adapter speed 1000
adapter srst delay 100
jtag_ntrst_delay 100
reset_config srst_only srst_nogate connect_assert_srst
$_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/mikroe/mini_m4_for_stm32/support/openocd.cfg | ini | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 130 |
```unknown
/*
*
*/
/dts-v1/;
#include <st/f4/stm32f415Rg.dtsi>
#include <st/f4/stm32f415rgtx-pinctrl.dtsi>
/ {
model = "Mikroe MINI-M4 for STM32 board";
compatible = "mikroe,mini-m4-for-stm32";
chosen {
zephyr,console = &usart2;
zephyr,shell-uart = &usart2;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,ccm = &ccm0;
};
leds {
compatible = "gpio-leds";
orange_led_1: led_1 {
gpios = <&gpioc 12 GPIO_ACTIVE_HIGH>;
label = "DATA LD1";
};
red_led_2: led_2 {
gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>;
label = "STAT LD2";
};
};
aliases {
led0 = &orange_led_1;
led1 = &red_led_2;
};
};
&clk_lsi {
status = "okay";
};
&clk_hse {
clock-frequency = <DT_FREQ_M(16)>;
status = "okay";
};
&pll {
div-m = <16>;
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>;
};
&usart2 {
pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>;
pinctrl-names = "default";
current-speed = <115200>;
status = "okay";
};
&i2c2 {
pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>;
pinctrl-names = "default";
status = "okay";
};
&spi1 {
pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5
&spi1_miso_pa6 &spi1_mosi_pa7>;
pinctrl-names = "default";
status = "okay";
};
&timers3 {
status = "okay";
pwm3: pwm {
status = "okay";
pinctrl-0 = <&tim3_ch1_pb4>;
pinctrl-names = "default";
};
};
zephyr_udc0: &usbotg_fs {
pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>;
pinctrl-names = "default";
status = "okay";
};
&cryp {
status = "okay";
};
&rtc {
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>,
<&rcc STM32_SRC_LSI RTC_SEL(2)>;
status = "okay";
};
``` | /content/code_sandbox/boards/mikroe/mini_m4_for_stm32/mikroe_mini_m4_for_stm32.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 692 |
```cmake
board_runner_args(jlink "--device=STM32F407VG" "--speed=4000")
board_runner_args(openocd --cmd-pre-init "source [find interface/jlink.cfg]")
board_runner_args(openocd --cmd-pre-init "source [find target/stm32f4x.cfg]")
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
``` | /content/code_sandbox/boards/mikroe/clicker_2/board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 98 |
```yaml
board:
name: mikroe_clicker_2
vendor: mikroe
socs:
- name: stm32f407xx
``` | /content/code_sandbox/boards/mikroe/clicker_2/board.yml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 33 |
```yaml
identifier: mikroe_clicker_2
name: MikroE Clicker 2 for STM32
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
ram: 192
flash: 1024
supported:
- spi
- i2c
- adc
vendor: mikroe
``` | /content/code_sandbox/boards/mikroe/clicker_2/mikroe_clicker_2.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 85 |
```restructuredtext
.. _mikroe_mini_m4_for_stm32:
Mikroe MINI-M4 for STM32
########################
Overview
********
MINI-M4 for STM32 is a small ARM Cortex-M4 development board containing
an `STM32F415RG`_ microcontroller. It is pin compatible with PIC16F887 and
PIC18(L)F45K20 microcontrollers and it perfectly fits into a standard DIP40
socket. The board is equipped with a 16MHz SMD crystal oscillator, and
a 32.768KHz crystal which can be used for the internal RTCC module.
It has a reset button and three signal LEDs.
It operates on a 3.3V power supply. An on-board voltage regulator allows
the board to be powered directly from a USB cable.
.. image:: img/mikroe_mini_m4_for_stm32.jpg
:align: center
:alt: MINI-M4 for STM32
Pin Mapping
===========
This port is a starting point for your own customizations and not a complete
port for a specific board. Most of the GPIOs on the STM32 SoC have been exposed
in the external header with silk screen labels that match the SoC's pin names.
For more information on Pin Mapping, please refer to `MINI-M4 for STM32 User Manual`_.
STLinkV2 connection:
====================
The board can be flashed by using STLinkV2 with the following connections.
+------------------+---------------------+
| MINI-M4(Pin no.) | ST-Link/V2(Pin no.) |
+==================+=====================+
| PA14(36) | TCK_SWCLK(9) |
+------------------+---------------------+
| PA13(35) | TMS_SWDIO(7) |
+------------------+---------------------+
| PA15(30) | TDI(5) |
+------------------+---------------------+
| PB3(29) | TDO_SWO(13) |
+------------------+---------------------+
| GND(31) | GND(8) |
+------------------+---------------------+
| MCLR(1) | NRST(15) |
+------------------+---------------------+
.. image:: img/st-linkv2.jpg
:align: center
:alt: ST-Link/V2
Supported Features
==================
The MINI-M4 for STM32 board configuration supports the following hardware
features:
+-----------+------------+----------------------+
| Interface | Controller | Driver/Component |
+===========+============+======================+
| CRYP | on-chip | crypto |
+-----------+------------+----------------------+
| NVIC | on-chip | nested vectored |
| | | interrupt controller |
+-----------+------------+----------------------+
| PINMUX | on-chip | pinmux |
+-----------+------------+----------------------+
| UART | on-chip | serial port |
+-----------+------------+----------------------+
| GPIO | on-chip | gpio |
+-----------+------------+----------------------+
| I2C | on-chip | i2c |
+-----------+------------+----------------------+
| SPI | on-chip | spi |
+-----------+------------+----------------------+
| PWM | on-chip | PWM |
+-----------+------------+----------------------+
| USB | on-chip | USB |
+-----------+------------+----------------------+
Other hardware features have not been enabled yet for this board.
The default configuration can be found in
:zephyr_file:`boards/mikroe/mini_m4_for_stm32/mikroe_mini_m4_for_stm32_defconfig`
Serial Port
===========
The Zephyr console output is assigned to USART2. Default settings are 115200 8N1.
Programming and Debugging
*************************
Applications for the ``mikroe_mini_m4_for_stm32`` board configuration can
be built and flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Flashing
========
The initial state of the board is set to lock.
When you flash, it will fail with the message:
.. code-block:: console
Error: stm32x device protected
Unlocking with openocd makes it possible to flash.
.. code-block:: console
$ openocd -f /usr/share/openocd/scripts/interface/stlink-v2.cfg \
-f /usr/share/openocd/scripts/target/stm32f4x.cfg -c init\
-c "reset halt" -c "stm32f4x unlock 0" -c "reset run" -c shutdown
Here is an example for the :ref:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: mikroe_mini_m4_for_stm32
:goals: build flash
You should see the following message on the console:
.. code-block:: console
Hello World! mikroe_mini_m4_for_stm32
Debugging
=========
You can debug an application in the usual way. Here is an example for the
:ref:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: mikroe_mini_m4_for_stm32
:maybe-skip-config:
:goals: debug
.. _STM32F415RG:
path_to_url
.. _MINI-M4 for STM32 User Manual:
path_to_url
``` | /content/code_sandbox/boards/mikroe/mini_m4_for_stm32/doc/mikroe_mini_m4_for_stm32.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,209 |
```unknown
config BOARD_MIKROE_CLICKER_2
select SOC_STM32F407XG
``` | /content/code_sandbox/boards/mikroe/clicker_2/Kconfig.mikroe_clicker_2 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 23 |
```unknown
# MikroE Clicker 2 board configuration
if BOARD_MIKROE_CLICKER_2
config SPI_STM32_INTERRUPT
default y
depends on SPI
endif #BOARD_MIKROE_CLICKER_2
``` | /content/code_sandbox/boards/mikroe/clicker_2/Kconfig.defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 50 |
```unknown
# Enable MPU
CONFIG_ARM_MPU=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/mikroe/clicker_2/mikroe_clicker_2_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 55 |
```unknown
/*
*
*/
/dts-v1/;
#include <st/f4/stm32f407Xg.dtsi>
#include <st/f4/stm32f407v(e-g)tx-pinctrl.dtsi>
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {
model = "MikroE clicker 2 for STM32";
compatible = "mikroe,stm32-e407", "st,stm32f407";
chosen {
zephyr,console = &uart4;
zephyr,shell-uart = &uart4;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,ccm = &ccm0;
};
leds {
compatible = "gpio-leds";
ld1: led_1 {
gpios = <&gpioe 12 GPIO_ACTIVE_HIGH>;
label = "User LD1";
};
ld2: led_2 {
gpios = <&gpioe 15 GPIO_ACTIVE_HIGH>;
label = "User LD2";
};
};
gpio_keys {
compatible = "gpio-keys";
user_button_0: key_0 {
label = "Key PE0";
gpios = <&gpioe 0 GPIO_ACTIVE_LOW>;
zephyr,code = <INPUT_KEY_0>;
};
user_button_1: key_1 {
label = "Key K1";
gpios = <&gpioe 10 GPIO_ACTIVE_LOW>;
zephyr,code = <INPUT_KEY_1>;
};
};
aliases {
led0 = &ld1;
led1 = &ld2;
sw0 = &user_button_0;
sw1 = &user_button_1;
volt-sensor0 = &vref;
volt-sensor1 = &vbat;
};
};
&clk_lsi {
status = "okay";
};
&clk_hse {
clock-frequency = <DT_FREQ_M(25)>;
status = "okay";
};
&pll {
div-m = <25>;
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>;
};
&usart2 {
pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6>;
pinctrl-names = "default";
current-speed = <9600>;
status = "okay";
};
&usart3 {
pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>;
pinctrl-names = "default";
current-speed = <9600>;
status = "okay";
};
&uart4 {
pinctrl-0 = <&uart4_tx_pa0 &uart4_rx_pa1>;
pinctrl-names = "default";
current-speed = <115200>;
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";
};
&spi2 {
pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>;
pinctrl-names = "default";
cs-gpios = <&gpioe 11 GPIO_ACTIVE_LOW>;
status = "okay";
};
&spi3 {
pinctrl-0 = <&spi3_sck_pc10 &spi3_miso_pc11 &spi3_mosi_pc12>;
pinctrl-names = "default";
cs-gpios = <&gpioe 8 GPIO_ACTIVE_LOW>;
status = "okay";
};
&i2c2 {
pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>;
pinctrl-names = "default";
status = "okay";
};
&i2c3 {
pinctrl-0 = <&i2c3_scl_pa8 &i2c3_sda_pc9>;
pinctrl-names = "default";
status = "okay";
};
&adc1 {
status ="okay";
pinctrl-0 = <&adc1_in2_pa2 &adc1_in3_pa3>;
pinctrl-names = "default";
st,adc-clock-source = <SYNC>;
st,adc-prescaler = <2>;
};
&vref {
status = "okay";
};
&vbat {
status = "okay";
};
mikrobus_1_i2c: &i2c3 {};
mikrobus_1_spi: &spi3 {};
mikrobus_1_uart: &usart2 {};
mikrobus_2_i2c: &i2c2 {};
mikrobus_2_spi: &spi2 {};
mikrobus_2_uart: &usart3 {};
``` | /content/code_sandbox/boards/mikroe/clicker_2/mikroe_clicker_2.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,159 |
```unknown
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=12000000
CONFIG_BUILD_OUTPUT_HEX=y
# enable uart driver
CONFIG_SERIAL=y
# enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
# enable GPIO
CONFIG_GPIO=y
# enable pin controller
CONFIG_PINCTRL=y
# enable Clocks
CONFIG_CLOCK_CONTROL=y
``` | /content/code_sandbox/boards/mikroe/clicker_ra4m1/mikroe_clicker_ra4m1_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 72 |
```unknown
/*
*
*/
/dts-v1/;
#include <renesas/ra/r7fa4m1ab3cfm.dtsi>
#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-r7fa4m1xxxxxx.h>
#include <zephyr/dt-bindings/gpio/gpio.h>
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {
model = "Mikroe Clicker RA4M1";
compatible = "renesas,r7fa4m1ab3cfm";
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
leds {
compatible = "gpio-leds";
ld1: led_1 {
gpios = <&ioport4 9 GPIO_ACTIVE_HIGH>;
label = "User LED 1";
};
ld2: led_2 {
gpios = <&ioport4 8 GPIO_ACTIVE_HIGH>;
label = "User LED 2";
};
};
buttons {
compatible = "gpio-keys";
btn1: button_1 {
gpios = <&ioport3 4 GPIO_ACTIVE_LOW>;
label = "User Button 1";
zephyr,code = <INPUT_KEY_0>;
};
};
aliases {
led0 = &ld1;
led1 = &ld2;
sw0 = &btn1;
};
};
&pinctrl {
sci0_default: sci0_default {
group1 {
pinmux = <P410_RXD0>, <P411_TXD0>;
};
};
};
&sci0 {
status = "okay";
pinctrl-0 = <&sci0_default>;
pinctrl-names = "default";
uart0: uart {
current-speed = <115200>;
status = "okay";
};
};
&ioport3 {
status = "okay";
};
&ioport4 {
status = "okay";
};
&fcu {
status = "okay";
};
&mosc {
status = "okay";
clock-frequency = <12000000>;
};
&cgc {
clock-source = <&mosc>;
iclk-div = <1>;
pclka-div = <1>;
pclkb-div = <2>;
pclkc-div = <1>;
pclkd-div = <1>;
fclk-div = <2>;
};
``` | /content/code_sandbox/boards/mikroe/clicker_ra4m1/mikroe_clicker_ra4m1.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 556 |
```cmake
board_runner_args(pyocd "--target=r7fa4m1ab")
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
``` | /content/code_sandbox/boards/mikroe/clicker_ra4m1/board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 35 |
```restructuredtext
.. _mikroe_clicker_2:
MikroE Clicker 2 for STM32
##########################
Overview
********
MikroE Clicker 2 for STM32 is a development board containing an `STM32F407`_
microcontroller. It is equipped with two mikrobus sockets and furthermore has
two headers for general signal break out.
The board also has battery connection and a battery management unit on board.
It can be powered either from a battery pack, such as a LiPo or from USB.
The board is equipped with a 25MHz crystal as well as a 32.768kHz clock crystal.
.. figure:: img/clicker-2-stm32f4-thickbox_default-2.jpg
:align: center
:alt: Clicker 2 For STM32
Clicker 2 For STM32 (Credit: MikroElektronika d.o.o.)
Hardware
********
The Clicker 2 board contains the following connections:
- Two MikroBUS connectors
- Two headers with general connections
Furthermore the board contains two LEDs and two push buttons that are connected
to the microcontroller.
Supported Features
==================
The Zephyr MikroE Clicker 2 configuration supports the following hardware features:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+=====================================+
| NVIC | on-chip | nested vector interrupt controller |
+-----------+------------+-------------------------------------+
| UART | on-chip | serial port-polling; |
| | | serial port-interrupt |
+-----------+------------+-------------------------------------+
| PINMUX | on-chip | pinmux |
+-----------+------------+-------------------------------------+
| I2C | on-chip | i2c |
+-----------+------------+-------------------------------------+
| SPI | on-chip | spi |
+-----------+------------+-------------------------------------+
| ADC | on-chip | adc |
+-----------+------------+-------------------------------------+
| USB | on-chip | usb |
+-----------+------------+-------------------------------------+
Other hardware features have not been enabled yet for this board.
The default configuration can be found in
:zephyr_file:`boards/mikroe/clicker_2/mikroe_clicker_2_defconfig`
Connections and IOs
===================
The two mikroBUS interfaces are aliased in the device tree so that their
peripherals can be accessed using ``mikrobus_N_INTERFACE`` so e.g. the spi on
bus 2 can be found by the alias ``mikrobus_2_spi``. The counting corresponds
with the marking on the board.
For connections on the edge connectors, please refer to `Clicker 2 for STM32 User Manual`_.
Programming and Debugging
*************************
Applications for the ``mikroe_clicker_2`` board configuration can
be built and flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Flashing
========
The initial state of the board is set to lock.
When you flash, it will fail with the message:
.. code-block:: console
Error: stm32x device protected
Unlocking with openocd makes it possible to flash.
.. code-block:: console
$ openocd -f /usr/share/openocd/scripts/interface/stlink-v2.cfg \
-f /usr/share/openocd/scripts/target/stm32f4x.cfg -c init\
-c "reset halt" -c "stm32f4x unlock 0" -c "reset run" -c shutdown
Here is an example for the :ref:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: mikroe_clicker_2
:goals: build flash
You should see the following message on the console:
.. code-block:: console
Hello World! mikroe_clicker_2
Debugging
=========
You can debug an application in the usual way. Here is an example for the
:ref:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: mikroe_clicker_2
:maybe-skip-config:
:goals: debug
References
**********
.. _Clicker 2 website:
path_to_url
.. _Clicker 2 for STM32 User Manual:
path_to_url
.. _STM32F407VG Website:
path_to_url
.. _STM32F407:
path_to_url
``` | /content/code_sandbox/boards/mikroe/clicker_2/doc/mikroe_clicker_2.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 999 |
```unknown
config BOARD_MIKROE_CLICKER_RA4M1
select SOC_R7FA4M1AB3CFM
``` | /content/code_sandbox/boards/mikroe/clicker_ra4m1/Kconfig.mikroe_clicker_ra4m1 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 28 |
```yaml
identifier: mikroe_clicker_ra4m1
name: Mikroe Clicker RA4M1
vendor: mikroe
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
ram: 32
flash: 256
supported:
- gpio
- uart
``` | /content/code_sandbox/boards/mikroe/clicker_ra4m1/mikroe_clicker_ra4m1.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 78 |
```yaml
board:
name: mikroe_clicker_ra4m1
vendor: mikroe
socs:
- name: r7fa4m1ab3cfm
``` | /content/code_sandbox/boards/mikroe/clicker_ra4m1/board.yml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 41 |
```restructuredtext
.. _boards-ite:
ITE Tech. Inc.
##############
.. toctree::
:maxdepth: 1
:glob:
**/*
``` | /content/code_sandbox/boards/ite/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 34 |
```unknown
config BOARD_IT82XX2_EVB
select SOC_IT82202AX
``` | /content/code_sandbox/boards/ite/it82xx2_evb/Kconfig.it82xx2_evb | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 18 |
```unknown
CONFIG_GEN_IRQ_VECTOR_TABLE=n
# General Kernel Options
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=32768
CONFIG_XIP=y
CONFIG_INIT_STACKS=y
# UART Driver
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
# Console Driver
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
# GPIO Driver
CONFIG_GPIO=y
# Power Management
CONFIG_PM=y
CONFIG_PM_DEVICE=y
CONFIG_PM_POLICY_CUSTOM=y
``` | /content/code_sandbox/boards/ite/it82xx2_evb/it82xx2_evb_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 93 |
```yaml
board:
name: it82xx2_evb
vendor: ite
socs:
- name: it82202ax
``` | /content/code_sandbox/boards/ite/it82xx2_evb/board.yml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 32 |
```unknown
if BOARD_IT82XX2_EVB
config INPUT
default y if KSCAN
endif
``` | /content/code_sandbox/boards/ite/it82xx2_evb/Kconfig.defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 22 |
```restructuredtext
.. _mikroe_clicker_ra4m1:
Mikroe Clicker RA4M1
####################
Overview
********
The Mikroe Clicker RA4M1 development board contains a Renesas Cortex-M4 based
R7FA4M1AB3CFM Microcontroller operating at up to 48 MHz with 256 KB of Flash
memory and 32 KB of SRAM.
.. figure:: img/mikroe_clicker_ra4m1.jpg
:align: center
:alt: Clicker RA4M1
Clicker RA4M1 (Credit: MikroElektronika d.o.o.)
Hardware
********
The Clicker RA4M1 board contains a USB Type-C connector, two LEDs, two push
buttons, and a reset button. It has J-Link onboard and mikroBUS socket for
interfacing with external electronics. For more information about the
development board see the `Clicker RA4M1 website`_.
Supported Features
==================
The Zephyr Mikroe Clicker RA4M1 configuration supports the following hardware
features:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+=====================================+
| NVIC | on-chip | nested vector interrupt controller |
+-----------+------------+-------------------------------------+
| UART | on-chip | serial port-polling |
+-----------+------------+-------------------------------------+
| PINMUX | on-chip | pinmux |
+-----------+------------+-------------------------------------+
| GPIO | on-chip | GPIO output |
| | | GPIO input |
+-----------+------------+-------------------------------------+
Other hardware features have not been enabled yet for this board.
The default configuration can be found in the defconfig file:
:zephyr_file:`boards/mikroe/clicker_ra4m1/mikroe_clicker_ra4m1_defconfig`.
Programming and debugging
*************************
Building & Flashing
===================
You can build and flash an application in the usual way (See
:ref:`build_an_application` and
:ref:`application_run` for more details).
Here is an example for building and flashing the :zephyr:code-sample:`blinky` application.
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: mikroe_clicker_ra4m1
:goals: build flash
Debugging
=========
Debugging also can be done in the usual way.
The following command is debugging the :zephyr:code-sample:`blinky` application.
Also, see the instructions specific to the debug server that you use.
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: mikroe_clicker_ra4m1
:maybe-skip-config:
:goals: debug
References
**********
.. target-notes::
.. _Clicker RA4M1 website:
path_to_url
``` | /content/code_sandbox/boards/mikroe/clicker_ra4m1/doc/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 641 |
```yaml
identifier: it82xx2_evb
name: ITE IT82XX2 EVB
type: mcu
arch: riscv
toolchain:
- zephyr
ram: 256
testing:
ignore_tags:
- net
- bluetooth
supported:
- adc
- espi
- gpio
- usb_device
- i2c
- kscan
- pm
- pwm
- tach
- uart
- watchdog
vendor: ite
``` | /content/code_sandbox/boards/ite/it82xx2_evb/it82xx2_evb.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 116 |
```unknown
/*
*/
/dts-v1/;
#include <zephyr/dt-bindings/gpio/gpio.h>
#include <ite/it82xx2.dtsi>
#include <ite/it8xxx2-pinctrl-map.dtsi>
/ {
model = "IT82XX2 EV-Board";
compatible = "ite,it82xx2-evb";
aliases {
i2c-0 = &i2c0;
peci-0 = &peci0;
led0 = &led0;
kscan0 = &kscan_input;
watchdog0 = &twd0;
pwm-0 = &pwm0;
};
chosen {
zephyr,console = &uart1;
zephyr,shell-uart = &uart1;
zephyr,bt-hci = &bt_hci_uart;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,flash-controller = &flashctrl;
zephyr,code-partition = &slot0_partition;
zephyr,keyboard-scan = &kscan_input;
};
leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <&gpioc 0 GPIO_ACTIVE_HIGH>;
label = "Green LED";
};
};
};
&adc0 {
status = "okay";
pinctrl-0 = <&adc0_ch3_gpi3_default>;
pinctrl-names = "default";
};
/* voltage comparator for test */
&vcmp0 {
status = "okay";
scan-period = <IT8XXX2_VCMP_SCAN_PERIOD_600US>;
comparison = <IT8XXX2_VCMP_GREATER>;
threshold-mv = <2000>;
io-channels = <&adc0 3>;
};
&i2c0 {
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
pinctrl-0 = <&i2c0_clk_gpb3_default
&i2c0_data_gpb4_default>;
pinctrl-names = "default";
};
&i2c1 {
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
pinctrl-0 = <&i2c1_clk_gpc1_default
&i2c1_data_gpc2_default>;
pinctrl-names = "default";
};
&i2c2 {
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
pinctrl-0 = <&i2c2_clk_gpf6_default
&i2c2_data_gpf7_default>;
pinctrl-names = "default";
};
&i2c3 {
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
pinctrl-0 = <&i2c3_clk_gph1_default
&i2c3_data_gph2_default>;
pinctrl-names = "default";
};
&i2c4 {
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
pinctrl-0 = <&i2c4_clk_gpe0_default
&i2c4_data_gpe7_default>;
pinctrl-names = "default";
};
&i2c5 {
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
pinctrl-0 = <&i2c5_clk_gpa4_default
&i2c5_data_gpa5_default>;
pinctrl-names = "default";
};
&uart1 {
status = "okay";
current-speed = <115200>;
clock-frequency = <1843200>;
};
&uart2 {
status = "okay";
current-speed = <460800>;
clock-frequency = <1843200>;
bt_hci_uart: bt_hci_uart {
compatible = "zephyr,bt-hci-uart";
status = "okay";
};
};
&ite_uart1_wrapper {
status = "okay";
pinctrl-0 = <&uart1_rx_gpb0_default
&uart1_tx_gpb1_default>;
pinctrl-names = "default";
};
&ite_uart2_wrapper {
status = "okay";
pinctrl-0 = <&uart2_rx_gpf0_default
&uart2_tx_gpf1_default>;
pinctrl-names = "default";
};
/* pwm for test */
&pwm0 {
status = "okay";
prescaler-cx = <PWM_PRESCALER_C6>;
/*
* If we need pwm output in ITE chip power saving mode,
* then we should set frequency <=324Hz.
*/
pwm-output-frequency = <324>;
pinctrl-0 = <&pwm0_gpa0_default>;
pinctrl-names = "default";
};
/* pwm for fan */
&pwm7 {
status = "okay";
prescaler-cx = <PWM_PRESCALER_C4>;
pwm-output-frequency = <30000>;
pinctrl-0 = <&pwm7_gpa7_default>;
pinctrl-names = "default";
};
/* fan tachometer sensor */
&tach0 {
status = "okay";
channel = <IT8XXX2_TACH_CHANNEL_A>;
pulses-per-round = <2>;
pinctrl-0 = <&tach0a_gpd6_default>;
pinctrl-names = "default";
};
&kbd {
status = "okay";
pinctrl-0 = <&ksi0_default
&ksi1_default
&ksi2_default
&ksi3_default
&ksi4_default
&ksi5_default
&ksi6_default
&ksi7_default
&kso0_default
&kso1_default
&kso2_default
&kso3_default
&kso4_default
&kso5_default
&kso6_default
&kso7_default
&kso8_default
&kso9_default
&kso10_default
&kso11_default
&kso12_default
&kso13_default
&kso14_default
&kso15_default>;
pinctrl-names = "default";
row-size = <8>;
col-size = <16>;
kscan_input: kscan-input {
compatible = "zephyr,kscan-input";
};
};
&peci0 {
status = "okay";
pinctrl-0 = <&peci_gpf6_default>;
pinctrl-names = "default";
};
&sha0 {
status = "okay";
};
zephyr_udc0: &usb0 {
status = "okay";
pinctrl-0 = <&usb0_dm_gph5_default
&usb0_dp_gph6_default>;
pinctrl-names = "default";
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
slot0_partition: partition@0 {
label = "image-0";
reg = <0x00000000 DT_SIZE_K(128)>;
};
slot1_partition: partition@20000 {
label = "image-1";
reg = <0x00020000 DT_SIZE_K(128)>;
};
storage_partition: partition@40000 {
label = "storage";
reg = <0x00040000 DT_SIZE_K(256)>;
};
};
};
``` | /content/code_sandbox/boards/ite/it82xx2_evb/it82xx2_evb.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,618 |
```cmake
set(SUPPORTED_EMU_PLATFORMS renode)
set(RENODE_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/support/it8xxx2_evb.resc)
board_set_flasher_ifnset(misc-flasher)
board_finalize_runner_args(misc-flasher)
``` | /content/code_sandbox/boards/ite/it8xxx2_evb/board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 54 |
```unknown
CONFIG_BOOT_DELAY=1
CONFIG_GEN_IRQ_VECTOR_TABLE=n
CONFIG_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_CONSOLE=y
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=32768
CONFIG_XIP=y
CONFIG_INIT_STACKS=y
CONFIG_LINKER_ORPHAN_SECTION_PLACE=y
CONFIG_COMPILER_OPT="-mcmodel=medlow"
CONFIG_GPIO=y
``` | /content/code_sandbox/boards/ite/it8xxx2_evb/it8xxx2_evb_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 83 |
```restructuredtext
.. _it82xx2_evb:
ITE IT82XX2 series
######################
Overview
********
The IT82XX2 is a 32-bit RISC-V microcontroller.
And a highly integrated embedded controller with system functions.
It is suitable for mobile system applications. The picture below is
the IT82202 development board (also known as it82xx2_evb) and its debug card.
.. figure:: it82xx2_evb_and_debug_card.jpg
:align: center
:alt: IT82202 EVB
To find out more about ITE, visit our World Wide Web at:`ITE's website`_
Hardware
********
The IT82XX2 series contains different chip types(ex, it82202, it82302),
and they support different hardware features.
Listing the IT82202 hardware features as following:
- RISC-V RV32IMAFC instruction set
- 4KB instruction cache size
- 256KB SRAM in total
- Built-in 32.768 kHz clock generator
- Embedded Flash, 512K/1024K-byte e-flash
- eSPI, SSPI, SPI slave, BRAM, KBC, PECI, UART
- GPIO, PWM, ADC, INTC, WUC, Timer, Watchdog, KB scan, JTAG
- Support 6 Voltage Comparator
- Support Cryptographic Engine
- 6 SMBus channels, with 6 DMA controller, compatible with I2C
- USB 2.0 Full-speed Controller
- USB Type-c CC Logic
- USB Power Delivery
Supported Features
==================
currently supports the following hardware features:
.. list-table:: Supported Features
:header-rows: 1
:widths: auto
* - Interface
- Controller
- Driver/Component
* - NVIC
- on-chip
- interrupt controller
* - FLASH
- on-chip
- flash controller
* - PINCTRL
- on-chip
- pin controller
* - ESPI
- on-chip
- espi
* - PECI
- on-chip
- peci
* - UART
- on-chip
- serial
* - GPIO
- on-chip
- gpio
* - PWM
- on-chip
- pwm
* - ADC
- on-chip
- adc
* - TIMER
- on-chip
- timer
* - WATCHDOG
- on-chip
- watchdog
* - KSCAN
- on-chip
- kscan
* - SENSOR
- on-chip
- voltage comparator
* - I2C
- on-chip
- i2c
Other hardware features are not currently supported by Zephyr.
The default configuration can be found in the
:zephyr_file:`boards/ite/it82xx2_evb/it82xx2_evb_defconfig` Kconfig file.
Programming and debugging on it82202
************************************
In order to upload the application to the device,
you'll need our flash tool and Download board.
You can get them at: `ITE's website`_.
Wiring
=======
#. Connect the Download Board to your host computer using the USB cable.
#. Connect the it82xx2_evb to the evolution motherboard.
#. Connect the Download Board J5 to J41 on the evolution motherboard.
#. Connect the USB to UART wire to J33 on the evolution motherboard.
.. image:: it82xx2_evb_wiring.jpg
:align: center
:alt: it82xx2_evb wiring
.. note:: Be careful during connection!
Use separate wires to connect I2C pins with pins on the it82xx2_evb board.
Wiring connection is described in the table below.
+-------------+---------------+
| J5 | it82xx2_evb |
| Connector | J41 Connector |
+=============+===============+
| 2 | E0 |
+-------------+---------------+
| 3 | E7 |
+-------------+---------------+
| 4 | GND |
+-------------+---------------+
For USB to UART cable, connect the evolution motherboard as below:
+-------------+---------------+
| USB to UART | Evolution |
| cable | motherboard |
| | J33 Connector |
+=============+===============+
| RX | B0 |
+-------------+---------------+
| TX | B1 |
+-------------+---------------+
| GND | GND |
+-------------+---------------+
Building
========
#. Build :ref:`hello_world` application as you would normally do
(see :`Zephyr Getting Started Guide`_):.
.. zephyr-app-commands::
:board: it82xx2_evb
:zephyr-app: samples/hello_world
:goals: build
#. The file :file:`zephyr.bin` will be created by west.
Flashing
========
Windows
--------
Use the winflash tool to program a zephyr application
to the it82xx2 board flash.
#. Open the winflash tool and make sure the order you open the switch is right.
First, turn on the Download board switch.
Second, turn on the it82xx2_evb board switch.
Then, configure your winflash tool like below.
.. figure:: WinFlashTool_P2.jpg
:align: center
.. figure:: WinFlashTool_P4.jpg
#. Using the winflash tool flash ``zephyr.bin`` into your ITE board.
First, click the ``Load`` button and select your ``zephyr.bin`` file.
Second, click ``run`` to flash the image into board.
.. figure:: WinFlashTool_P3.jpg
:align: center
#. At this point, you have flashed your image into ITE board and
it will work if you turn on the ITE board. You can use a terminal program
to verify flashing worked correctly.
For example, open device manager to find the USB Serial Port(COM4) and use your
terminal program to connect it(Speed: 115200).
.. figure:: WinFlashTool_P1.jpg
:align: center
#. Turn on the it82xx2_evb board switch, you should see ``"Hello World! it82xx2_evb"``
sent by the board. If you don't see this message, press the Reset button and the
message should appear.
Ubuntu
--------
#. Run your favorite terminal program to listen for output.
Under Linux the terminal should be :code:`/dev/ttyUSB0`. Do not close it.
For example:
.. code-block:: console
$ minicom -D /dev/ttyUSB0 -b 115200
#. Open a second terminal window and use the Linux flash tool to flash your board.
.. code-block:: console
$ sudo ~/itetool/ite -f build/zephyr/zephyr.bin
.. note:: The source code of ITE tool can be downloaded here:
path_to_url
#. Split first and second terminal windows to view both of them.
You should see ``"Hello World! it82xx2_evb"`` in the first terminal window.
If you don't see this message, press the Reset button and the message should appear.
Debugging
=========
it82xx2_evb board can be debugged by connecting USB to UART. We can write commands and
read messages through minicom in the Ubuntu terminal.
Troubleshooting
===============
#. If the flash tool reports a failure, re-plug the 8390 Download board or
power cycle the it82xx2_evb board and try again.
References
==========
.. target-notes::
.. _ITE's website: path_to_url
.. _Zephyr Getting Started Guide: path_to_url
``` | /content/code_sandbox/boards/ite/it82xx2_evb/doc/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,736 |
```yaml
board:
name: it8xxx2_evb
vendor: ite
socs:
- name: it81302bx
``` | /content/code_sandbox/boards/ite/it8xxx2_evb/board.yml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 32 |
```unknown
if BOARD_IT8XXX2_EVB
if PM
config PM_DEVICE
default y
choice PM_POLICY
default PM_POLICY_CUSTOM
endchoice
endif # PM
config INPUT
default y if KSCAN
endif # BOARD_IT8XXX2_EVB
``` | /content/code_sandbox/boards/ite/it8xxx2_evb/Kconfig.defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 56 |
```unknown
config BOARD_IT8XXX2_EVB
select SOC_IT81302BX
``` | /content/code_sandbox/boards/ite/it8xxx2_evb/Kconfig.it8xxx2_evb | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 18 |
```yaml
identifier: it8xxx2_evb
name: ITE IT8XXX2 EVB
type: mcu
arch: riscv
toolchain:
- zephyr
ram: 60
testing:
ignore_tags:
- net
- bluetooth
supported:
- gpio
- adc
- i2c
- kscan
- pwm
- watchdog
vendor: ite
``` | /content/code_sandbox/boards/ite/it8xxx2_evb/it8xxx2_evb.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 93 |
```unknown
:name: ITE-evb
:description: This script is prepared to run Zephyr on a Mi-V RISC-V board.
$name?="ITE-evb"
using sysbus
mach create $name
machine LoadPlatformDescription @platforms/boards/it8xxx2_evb.repl
showAnalyzer uart
cpu PerformanceInMips 80
macro reset
"""
sysbus LoadELF $elf
"""
runMacro $reset
``` | /content/code_sandbox/boards/ite/it8xxx2_evb/support/it8xxx2_evb.resc | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 93 |
```unknown
/*
*/
/dts-v1/;
#include <zephyr/dt-bindings/gpio/gpio.h>
#include <ite/it81xx2.dtsi>
#include <ite/it8xxx2-pinctrl-map.dtsi>
/ {
model = "IT8XXX2 EV-Board";
compatible = "ite,it8xxx2-evb";
aliases {
i2c-0 = &i2c0;
peci-0 = &peci0;
led0 = &led0;
kscan0 = &kscan_input;
watchdog0 = &twd0;
pwm-0 = &pwm0;
};
chosen {
zephyr,console = &uart1;
zephyr,shell-uart = &uart1;
zephyr,bt-hci = &bt_hci_uart;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,flash-controller = &flashctrl;
zephyr,code-partition = &slot0_partition;
zephyr,keyboard-scan = &kscan_input;
};
leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <&gpioc 0 GPIO_ACTIVE_HIGH>;
label = "Green LED";
};
};
};
&adc0 {
status = "okay";
pinctrl-0 = <&adc0_ch3_gpi3_default>;
pinctrl-names = "default";
};
/* voltage comparator for test */
&vcmp0 {
status = "okay";
scan-period = <IT8XXX2_VCMP_SCAN_PERIOD_600US>;
comparison = <IT8XXX2_VCMP_GREATER>;
threshold-mv = <2000>;
io-channels = <&adc0 3>;
};
&i2c0 {
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
pinctrl-0 = <&i2c0_clk_gpb3_default
&i2c0_data_gpb4_default>;
pinctrl-names = "default";
};
&i2c1 {
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
pinctrl-0 = <&i2c1_clk_gpc1_default
&i2c1_data_gpc2_default>;
pinctrl-names = "default";
};
&i2c2 {
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
pinctrl-0 = <&i2c2_clk_gpf6_default
&i2c2_data_gpf7_default>;
pinctrl-names = "default";
};
&i2c3 {
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
pinctrl-0 = <&i2c3_clk_gph1_default
&i2c3_data_gph2_default>;
pinctrl-names = "default";
};
&i2c4 {
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
pinctrl-0 = <&i2c4_clk_gpe0_default
&i2c4_data_gpe7_default>;
pinctrl-names = "default";
};
&i2c5 {
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
pinctrl-0 = <&i2c5_clk_gpa4_default
&i2c5_data_gpa5_default>;
pinctrl-names = "default";
};
&uart1 {
status = "okay";
current-speed = <115200>;
clock-frequency = <1843200>;
};
&uart2 {
status = "okay";
current-speed = <460800>;
clock-frequency = <1843200>;
bt_hci_uart: bt_hci_uart {
compatible = "zephyr,bt-hci-uart";
status = "okay";
};
};
&ite_uart1_wrapper {
status = "okay";
pinctrl-0 = <&uart1_rx_gpb0_default
&uart1_tx_gpb1_default>;
pinctrl-names = "default";
};
&ite_uart2_wrapper {
status = "okay";
pinctrl-0 = <&uart2_rx_gph1_default
&uart2_tx_gph2_default>;
pinctrl-names = "default";
};
/* pwm for test */
&pwm0 {
status = "okay";
prescaler-cx = <PWM_PRESCALER_C6>;
/*
* If we need pwm output in ITE chip power saving mode,
* then we should set frequency <=324Hz.
*/
pwm-output-frequency = <324>;
pinctrl-0 = <&pwm0_gpa0_default>;
pinctrl-names = "default";
};
/* pwm for fan */
&pwm7 {
status = "okay";
prescaler-cx = <PWM_PRESCALER_C4>;
pwm-output-frequency = <30000>;
pinctrl-0 = <&pwm7_gpa7_default>;
pinctrl-names = "default";
};
/* fan tachometer sensor */
&tach0 {
status = "okay";
channel = <IT8XXX2_TACH_CHANNEL_A>;
pulses-per-round = <2>;
pinctrl-0 = <&tach0a_gpd6_default>;
pinctrl-names = "default";
};
&kbd {
status = "okay";
pinctrl-0 = <&ksi0_default
&ksi1_default
&ksi2_default
&ksi3_default
&ksi4_default
&ksi5_default
&ksi6_default
&ksi7_default
&kso0_default
&kso1_default
&kso2_default
&kso3_default
&kso4_default
&kso5_default
&kso6_default
&kso7_default
&kso8_default
&kso9_default
&kso10_default
&kso11_default
&kso12_default
&kso13_default
&kso14_default
&kso15_default>;
pinctrl-names = "default";
row-size = <8>;
col-size = <16>;
kscan_input: kscan-input {
compatible = "zephyr,kscan-input";
};
};
&peci0 {
status = "okay";
pinctrl-0 = <&peci_gpf6_default>;
pinctrl-names = "default";
};
&sha0 {
status = "okay";
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x20000>;
};
slot0_partition: partition@20000 {
label = "image-0";
reg = <0x00020000 0x20000>;
};
slot1_partition: partition@40000 {
label = "image-1";
reg = <0x00040000 0x10000>;
};
scratch_partition: partition@50000 {
label = "image-scratch";
reg = <0x00050000 0x10000>;
};
storage_partition: partition@60000 {
label = "storage";
reg = <0x00060000 0x20000>;
};
};
};
``` | /content/code_sandbox/boards/ite/it8xxx2_evb/it8xxx2_evb.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,636 |
```restructuredtext
.. _boards-heltec:
Heltec
######
.. toctree::
:maxdepth: 1
:glob:
**/*
``` | /content/code_sandbox/boards/heltec/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 33 |
```unknown
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_CLOCK_CONTROL=y
``` | /content/code_sandbox/boards/heltec/heltec_wireless_stick_lite_v3/heltec_wireless_stick_lite_v3_appcpu_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 15 |
```restructuredtext
.. _it8xxx2_evb:
ITE IT8XXX2 series
######################
Overview
********
The IT8XXX2 is a 32-bit RISC-V Micro-controller.
And a highly integrated embedded controller with system functions.
It is suitable for mobile system applications. The picture below is
the IT81302 MECC board (also known as it8xxx2_evb) and its debug card.
.. figure:: it8xxx2_evb_and_debug_card.jpg
:align: center
:alt: IT81302 EVB
To find out more about ITE, visit our World Wide Web at:`ITE's website`_
Hardware
********
The IT8XXX2 series contains different chip types(ex, it81302, it83202),
and they support different hardware features.
Listing the IT81302 hardware features as following:
- RISC-V RV32IMAFC instruction set
- 4KB instruction cache size
- 60KB SDRAM in total
- Built-in 32.768 kHz clock generator
- PWM, eSPI, LPC, FLASH, UART, GPIO, Timer, Watchdog, ADC, JTAG
- 6 SMBus channels, with 3 DMA controllers, compatible with I2C
- SPI master/slave
- USB Type-c CC Logic
- USB Power Delivery
- Support KB scan
Supported Features
==================
currently supports the following hardware features:
.. list-table:: Supported Features
:header-rows: 1
:widths: auto
* - Interface
- Controller
- Driver/Component
* - NVIC
- on-chip
- interrupt controller
* - TIMER
- on-chip
- timer
* - UART
- on-chip
- serial
* - GPIO
- on-chip
- gpio
* - ADC
- on-chip
- adc
* - I2C
- on-chip
- i2c
* - KSCAN
- on-chip
- kscan
Other hardware features are not currently supported by Zephyr.
The default configuration can be found in the
:zephyr_file:`boards/ite/it8xxx2_evb/it8xxx2_evb_defconfig` Kconfig file.
Hardware reworks
****************
Before using the it8xxx2_evb, some hardware rework is needed. The HW rework
guide can be found in ITE's website.
path_to_url
Programming and debugging on it83202
************************************
In order to upload the application to the device,
you'll need our flash tool and Download board.
You can get them at: `ITE's website`_.
Wiring
=======
#. Connect the Download Board to your host computer using the USB cable.
#. Connect the it8xxx2_evb to your host computer or a 5V1A USB power supply.
#. Connect the Download Board J5 to J8 on the it8xxx2_evb board.
#. Connect the USB to UART wire to it8xxx2_evb.
.. image:: it8xxx2_evb_wiring.jpg
:align: center
:alt: it8xxx2_evb wiring
.. note:: Be careful during connection!
Use separate wires to connect I2C pins with pins on the it8xxx2_evb board.
Wiring connection is described in the table below.
+-------------+---------------+
| J5 | it8xxx2_evb |
| Connector | J8 Connector |
+=============+===============+
| 2 | 1 |
+-------------+---------------+
| 3 | 3 |
+-------------+---------------+
| 4 | 5 |
+-------------+---------------+
For USB to UART cable, connect the it8xxx2_evb as below:
+-------------+---------------+
| USB to UART | it8xxx2_evb |
| cable | J5 Connector |
+=============+===============+
| RX | J5.3 |
+-------------+---------------+
| TX | J5.4 |
+-------------+---------------+
| GND | eSPI Debug.10 |
+-------------+---------------+
Building
========
#. Build :ref:`hello_world` application as you would normally do
(see :`Zephyr Getting Started Guide`_):.
.. zephyr-app-commands::
:board: it8xxx2_evb
:zephyr-app: samples/hello_world
:goals: build
#. The file :file:`zephyr.bin` will be created by west.
Flashing
========
Windows
--------
Use the winflash tool to program a zephyr application
to the it8xxx2 board flash.
#. Open winflash tool and make sure the order you open the switch is right.
Fisrt, turn on the Download board switch.
Second, turn on the it8xxx2_evb board switch.
Then, configure your winflash tool like below.
.. figure:: WinFlashTool_P2.jpg
:align: center
.. figure:: WinFlashTool_P4.jpg
#. Using winflash tool flash zephyr.bin into your ITE board.
First, click ``Load`` button and select your zephyr.bin file.
Second, click ``run`` to flash the iamge into board.
.. figure:: WinFlashTool_P3.jpg
:align: center
#. At this point, you have flashed your image into ITE board and
it will work if you turn on ITE board. You can use a terminal program
to verify flashing worked correctly.
For example, open device manager to find the USB Serial Port(COM4) and use your
terminal program to connect it(Speed: 115200).
.. figure:: WinFlashTool_P1.jpg
:align: center
#. Turn on the it8xxx2_evb board switch, you should see ``"Hello World! it8xxx2_evb"``
sent by the board. If you don't see this message, press the Reset button and the
message should appear.
Ubuntu
--------
#. Run your favorite terminal program to listen for output.
Under Linux the terminal should be :code:`/dev/ttyUSB0`. Do not close it.
For example:
.. code-block:: console
$ minicom -D /dev/ttyUSB0 -b 115200
#. Open a second terminal window and use linux flash tool to flash your board.
.. code-block:: console
$ sudo ~/itetool/ite -f build/zephyr/zephyr.bin
.. note:: The source code of ITE tool can be downloaded here:
path_to_url
#. Split first and second terminal windows to view both of them.
You should see ``"Hello World! it8xxx2_evb"`` in the first terminal window.
If you don't see this message, press the Reset button and the message should appear.
Debugging
=========
Supporting uart debug, currently.
Troubleshooting
===============
#. If the flash tool reports a failure, re-plug the 8390 Download board or
power cycle the it8xxx2_evb board and try again.
References
==========
.. target-notes::
.. _ITE's website: path_to_url
.. _Zephyr Getting Started Guide: path_to_url
``` | /content/code_sandbox/boards/ite/it8xxx2_evb/doc/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,606 |
```yaml
identifier: heltec_wireless_stick_lite_v3/esp32s3/appcpu
name: Heltec Wireless Stick Lite (V3) APPCPU
type: mcu
arch: xtensa
toolchain:
- zephyr
supported:
- uart
testing:
ignore_tags:
- net
- bluetooth
- flash
- cpp
- posix
- watchdog
- logging
- kernel
- pm
- gpio
- crypto
- eeprom
- heap
- cmsis_rtos
- jwt
- zdsp
vendor: heltec
``` | /content/code_sandbox/boards/heltec/heltec_wireless_stick_lite_v3/heltec_wireless_stick_lite_v3_appcpu.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 139 |
```cmake
if(NOT "${OPENOCD}" MATCHES "^${ESPRESSIF_TOOLCHAIN_PATH}/.*")
set(OPENOCD OPENOCD-NOTFOUND)
endif()
find_program(OPENOCD openocd PATHS ${ESPRESSIF_TOOLCHAIN_PATH}/openocd-esp32/bin NO_DEFAULT_PATH)
include(${ZEPHYR_BASE}/boards/common/esp32.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
``` | /content/code_sandbox/boards/heltec/heltec_wireless_stick_lite_v3/board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 102 |
```unknown
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_CLOCK_CONTROL=y
CONFIG_CONSOLE=y
CONFIG_GPIO=y
CONFIG_PWM=y
CONFIG_SERIAL=y
CONFIG_SPI=y
CONFIG_UART_CONSOLE=y
``` | /content/code_sandbox/boards/heltec/heltec_wireless_stick_lite_v3/heltec_wireless_stick_lite_v3_procpu_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 40 |
```unknown
/*
*
*/
/dts-v1/;
#include <espressif/esp32s3/esp32s3_fn8.dtsi>
#include "heltec_wireless_stick_lite_v3-pinctrl.dtsi"
#include <zephyr/dt-bindings/pwm/pwm.h>
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <zephyr/dt-bindings/lora/sx126x.h>
/ {
model = "Heltec Wireless Stick Lite V3 PROCPU";
compatible = "espressif,esp32s3";
aliases {
pwm-0 = &ledc0;
pwm-led0 = &pwm_led_white;
uart-0 = &uart0;
uart-1 = &uart1;
i2c-0 = &i2c0;
lora0 = &lora0;
sw0 = &button0;
watchdog0 = &wdt0;
};
leds {
compatible = "gpio-leds";
vext: vext {
gpios = <&gpio0 36 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "Vext Control";
};
adc: adc {
gpios = <&gpio0 37 GPIO_ACTIVE_LOW>;
label = "ADC Control";
};
};
pwmleds {
compatible = "pwm-leds";
pwm_led_white: pwm_led_gpio0_35 {
label = "White PWM LED";
pwms = <&ledc0 0 PWM_MSEC(10) PWM_POLARITY_NORMAL>;
};
};
buttons {
compatible = "gpio-keys";
button0: button_0 {
gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "USER SW";
zephyr,code = <INPUT_KEY_0>;
};
};
vbatt {
compatible = "voltage-divider";
io-channels = <&adc1 0>;
output-ohms = <100000>;
full-ohms = <(100000 + 390000)>;
};
chosen {
zephyr,sram = &sram0;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
zephyr,bt-hci = &esp32_bt_hci;
};
};
&adc1 {
status ="okay";
};
&uart0 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
pinctrl-names = "default";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&ledc0 {
pinctrl-0 = <&ledc0_default>;
pinctrl-names = "default";
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
channel0@0 {
reg = <0x0>;
timer = <0>;
};
};
&i2c0 {
clock-frequency = <I2C_BITRATE_STANDARD>;
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
};
&spi2 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pinctrl-0 = <&spim2_default>;
pinctrl-names = "default";
lora0: lora@0 {
compatible = "semtech,sx1262";
reg = <0>;
reset-gpios = <&gpio0 12 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>;
busy-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
dio1-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
dio2-tx-enable;
dio3-tcxo-voltage = <SX126X_DIO3_TCXO_1V8>;
tcxo-power-startup-delay-ms = <5>;
spi-max-frequency = <16000000>;
};
};
&twai {
pinctrl-0 = <&twai_default>;
pinctrl-names = "default";
};
&timer0 {
status = "okay";
};
&timer1 {
status = "okay";
};
&timer2 {
status = "okay";
};
&timer3 {
status = "okay";
};
&wdt0 {
status = "okay";
};
&trng0 {
status = "okay";
};
&uart1 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart1_default>;
pinctrl-names = "default";
};
&flash0 {
status = "okay";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/* Reserve 64kB for the bootloader */
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x00010000>;
read-only;
};
/* Reserve 1024kB for the application in slot 0 */
slot0_partition: partition@10000 {
label = "image-0";
reg = <0x00010000 0x00100000>;
};
/* Reserve 1024kB for the application in slot 1 */
slot1_partition: partition@110000 {
label = "image-1";
reg = <0x00110000 0x00100000>;
};
/* Reserve 256kB for the scratch partition */
scratch_partition: partition@210000 {
label = "image-scratch";
reg = <0x00210000 0x00040000>;
};
storage_partition: partition@250000 {
label = "storage";
reg = <0x00250000 0x00006000>;
};
};
};
&esp32_bt_hci {
status = "okay";
};
``` | /content/code_sandbox/boards/heltec/heltec_wireless_stick_lite_v3/heltec_wireless_stick_lite_v3_procpu.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,350 |
```yaml
identifier: heltec_wireless_stick_lite_v3/esp32s3/procpu
name: Heltec Wireless Stick Lite (V3)
type: mcu
arch: xtensa
toolchain:
- zephyr
supported:
- gpio
- uart
- i2c
- spi
- can
- counter
- watchdog
- entropy
- pwm
- dma
- lora
testing:
ignore_tags:
- net
- bluetooth
vendor: heltec
``` | /content/code_sandbox/boards/heltec/heltec_wireless_stick_lite_v3/heltec_wireless_stick_lite_v3_procpu.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 118 |
```c
/*
*
*/
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/init.h>
#define VEXT_PIN DT_GPIO_PIN(DT_NODELABEL(vext), gpios)
static int board_heltec_wireless_stick_lite_v3_init(void)
{
const struct device *gpio;
gpio = DEVICE_DT_GET(DT_NODELABEL(gpio0));
if (!device_is_ready(gpio)) {
return -ENODEV;
}
/* turns external VCC on */
gpio_pin_configure(gpio, VEXT_PIN, GPIO_OUTPUT);
gpio_pin_set_raw(gpio, VEXT_PIN, 0);
return 0;
}
SYS_INIT(board_heltec_wireless_stick_lite_v3_init, PRE_KERNEL_2, CONFIG_GPIO_INIT_PRIORITY);
``` | /content/code_sandbox/boards/heltec/heltec_wireless_stick_lite_v3/board_init.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 166 |
```unknown
choice BOOTLOADER
default BOOTLOADER_MCUBOOT
endchoice
choice BOOT_SIGNATURE_TYPE
default BOOT_SIGNATURE_TYPE_NONE
endchoice
``` | /content/code_sandbox/boards/heltec/heltec_wireless_stick_lite_v3/Kconfig.sysbuild | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 32 |
```unknown
# Heltec Wireless Stick Lite (V3) board configuration
config BOARD_HELTEC_WIRELESS_STICK_LITE_V3
select SOC_ESP32S3_FN8
select SOC_ESP32S3_PROCPU if BOARD_HELTEC_WIRELESS_STICK_LITE_V3_ESP32S3_PROCPU
select SOC_ESP32S3_APPCPU if BOARD_HELTEC_WIRELESS_STICK_LITE_V3_ESP32S3_APPCPU
``` | /content/code_sandbox/boards/heltec/heltec_wireless_stick_lite_v3/Kconfig.heltec_wireless_stick_lite_v3 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 101 |
```unknown
/*
*
*/
/dts-v1/;
#include <espressif/esp32s3/esp32s3_appcpu.dtsi>
/ {
model = "Heltec Wireless Stick Lite V3 APPCPU";
compatible = "espressif,esp32s3";
chosen {
zephyr,sram = &sram0;
zephyr,ipc_shm = &shm0;
zephyr,ipc = &ipm0;
};
};
&trng0 {
status = "okay";
};
&ipm0 {
status = "okay";
};
&flash0 {
status = "okay";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/* Reserve 64kB for the bootloader */
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x00010000>;
read-only;
};
/* Reserve 1024kB for the application in slot 0 */
slot0_partition: partition@10000 {
label = "image-0";
reg = <0x00010000 0x00100000>;
};
/* Reserve 1024kB for the application in slot 1 */
slot1_partition: partition@110000 {
label = "image-1";
reg = <0x00110000 0x00100000>;
};
/* Reserve 256kB for the scratch partition */
scratch_partition: partition@210000 {
label = "image-scratch";
reg = <0x00210000 0x00040000>;
};
storage_partition: partition@250000 {
label = "storage";
reg = <0x00250000 0x00006000>;
};
};
};
``` | /content/code_sandbox/boards/heltec/heltec_wireless_stick_lite_v3/heltec_wireless_stick_lite_v3_appcpu.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 409 |
```yaml
board:
name: heltec_wireless_stick_lite_v3
vendor: heltec
socs:
- name: esp32s3
``` | /content/code_sandbox/boards/heltec/heltec_wireless_stick_lite_v3/board.yml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 35 |
```unknown
# Heltec Wireless Stick Lite (V3) board configuration
if BOARD_HELTEC_WIRELESS_STICK_LITE_V3_ESP32S3_PROCPU
config HEAP_MEM_POOL_ADD_SIZE_BOARD
int
default 65535 if WIFI && BT
default 51200 if WIFI
default 40960 if BT
default 4096
endif # BOARD_HELTEC_WIRELESS_STICK_LITE_V3_ESP32S3_PROCPU
if BOARD_HELTEC_WIRELESS_STICK_LITE_V3_ESP32S3_APPCPU
config HEAP_MEM_POOL_ADD_SIZE_BOARD
default 256
endif # BOARD_HELTEC_WIRELESS_STICK_LITE_V3_ESP32S3_APPCPU
``` | /content/code_sandbox/boards/heltec/heltec_wireless_stick_lite_v3/Kconfig.defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 154 |
```ini
set ESP_RTOS none
set ESP32_ONLYCPU 1
# Source the JTAG interface configuration file
source [find interface/esp_usb_jtag.cfg]
# Source the ESP32-S3 configuration file
source [find target/esp32s3.cfg]
``` | /content/code_sandbox/boards/heltec/heltec_wireless_stick_lite_v3/support/openocd.cfg | ini | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 56 |
```unknown
/*
*
*/
#include <zephyr/dt-bindings/pinctrl/esp-pinctrl-common.h>
#include <dt-bindings/pinctrl/esp32s3-pinctrl.h>
#include <zephyr/dt-bindings/pinctrl/esp32s3-gpio-sigmap.h>
&pinctrl {
uart0_default: uart0_default {
group1 {
pinmux = <UART0_TX_GPIO43>;
output-high;
};
group2 {
pinmux = <UART0_RX_GPIO44>;
bias-pull-up;
};
};
uart1_default: uart1_default {
group1 {
pinmux = <UART1_TX_GPIO17>;
output-high;
};
group2 {
pinmux = <UART1_RX_GPIO18>;
bias-pull-up;
};
};
i2c0_default: i2c0_default {
group1 {
pinmux = <I2C0_SDA_GPIO2>,
<I2C0_SCL_GPIO3>;
bias-pull-up;
drive-open-drain;
output-high;
};
};
spim2_default: spim2_default {
group1 {
pinmux = <SPIM2_MISO_GPIO11>,
<SPIM2_SCLK_GPIO9>,
<SPIM2_CSEL_GPIO8>;
};
group2 {
pinmux = <SPIM2_MOSI_GPIO10>;
output-low;
};
};
twai_default: twai_default {
group1 {
pinmux = <TWAI_TX_GPIO5>,
<TWAI_RX_GPIO6>;
};
};
ledc0_default: ledc0_default {
group1 {
pinmux = <LEDC_CH0_GPIO35>;
output-enable;
};
};
};
``` | /content/code_sandbox/boards/heltec/heltec_wireless_stick_lite_v3/heltec_wireless_stick_lite_v3-pinctrl.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 412 |
```cmake
include(${ZEPHYR_BASE}/boards/common/esp32.board.cmake)
``` | /content/code_sandbox/boards/heltec/heltec_wifi_lora32_v2/board.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 19 |
```unknown
/*
*
*/
/dts-v1/;
#include <espressif/esp32/esp32_d0wd_v3.dtsi>
#include "heltec_wifi_lora32_v2-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {
model = "Heltec Wi-Fi Lora32 V2 PROCPU";
compatible = "espressif,esp32";
aliases {
uart-0 = &uart0;
i2c-0 = &i2c0;
led0 = &led0;
sw0 = &button0;
watchdog0 = &wdt0;
lora0 = &lora0;
};
leds {
compatible = "gpio-leds";
led0: led {
gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
label = "White LED";
};
vext: vext {
gpios = <&gpio0 21 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "External VCC";
};
oledrst: oledrst {
gpios = <&gpio0 16 (GPIO_PULL_UP | GPIO_ACTIVE_HIGH)>;
label = "OLED Reset";
};
};
buttons {
compatible = "gpio-keys";
button0: button_0 {
gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "PRG Button";
zephyr,code = <INPUT_KEY_0>;
};
};
chosen {
zephyr,sram = &sram0;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
zephyr,bt-hci = &esp32_bt_hci;
};
};
&uart0 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
pinctrl-names = "default";
};
&gpio0 {
status = "okay";
};
&trng0 {
status = "okay";
};
&i2c0 {
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
sda-gpios = <&gpio0 4 GPIO_OPEN_DRAIN>;
scl-gpios = <&gpio0 15 GPIO_OPEN_DRAIN>;
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
};
&spi3 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pinctrl-0 = <&spim3_default>;
pinctrl-names = "default";
cs-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
lora0: lora@0 {
compatible = "semtech,sx1276";
reg = <0>;
reset-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
dio-gpios =
/* SX1276 D0 -> GPIO26 */
<&gpio0 26 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>,
/* SX1276 D1 -> GPIO35 */
<&gpio1 3 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>,
/* SX1276 D1 -> GPIO34 */
<&gpio1 2 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
spi-max-frequency = <1000000>;
power-amplifier-output = "pa-boost";
};
};
&flash0 {
/* the board is using plain d0wd SoC part without the flash
* so any additional flash size should be defined at the board level
*/
reg = <0x0 DT_SIZE_M(8)>;
status = "okay";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/* Reserve 60kB for the bootloader */
boot_partition: partition@1000 {
label = "mcuboot";
reg = <0x00001000 0x0000F000>;
read-only;
};
/* Reserve 1024kB for the application in slot 0 */
slot0_partition: partition@10000 {
label = "image-0";
reg = <0x00010000 0x00100000>;
};
/* Reserve 1024kB for the application in slot 1 */
slot1_partition: partition@110000 {
label = "image-1";
reg = <0x00110000 0x00100000>;
};
/* Reserve 256kB for the scratch partition */
scratch_partition: partition@210000 {
label = "image-scratch";
reg = <0x00210000 0x00040000>;
};
storage_partition: partition@250000 {
label = "storage";
reg = <0x00250000 0x00006000>;
};
};
};
&esp32_bt_hci {
status = "okay";
};
/* Required by the ssd1306_128x64 shield which enables the OLED display */
arduino_i2c: &i2c0 {};
``` | /content/code_sandbox/boards/heltec/heltec_wifi_lora32_v2/heltec_wifi_lora32_v2_procpu.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,164 |
```yaml
identifier: heltec_wifi_lora32_v2/esp32/procpu
name: HELTEC WiFi LoRa 32 (V2) Board PROCPU
type: mcu
arch: xtensa
toolchain:
- zephyr
supported:
- gpio
- i2c
- watchdog
- uart
- nvs
testing:
ignore_tags:
- net
- bluetooth
vendor: espressif
``` | /content/code_sandbox/boards/heltec/heltec_wifi_lora32_v2/heltec_wifi_lora32_v2_procpu.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 99 |
```c
/*
*
*/
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/init.h>
#define VEXT_PIN DT_GPIO_PIN(DT_NODELABEL(vext), gpios)
#define OLED_RST DT_GPIO_PIN(DT_NODELABEL(oledrst), gpios)
static int board_heltec_wifi_lora32_v2_init(void)
{
const struct device *gpio;
gpio = DEVICE_DT_GET(DT_NODELABEL(gpio0));
if (!device_is_ready(gpio)) {
return -ENODEV;
}
/* turns external VCC on */
gpio_pin_configure(gpio, VEXT_PIN, GPIO_OUTPUT);
gpio_pin_set_raw(gpio, VEXT_PIN, 0);
/* turns OLED on */
gpio_pin_configure(gpio, OLED_RST, GPIO_OUTPUT);
gpio_pin_set_raw(gpio, OLED_RST, 1);
return 0;
}
SYS_INIT(board_heltec_wifi_lora32_v2_init, PRE_KERNEL_2, CONFIG_GPIO_INIT_PRIORITY);
``` | /content/code_sandbox/boards/heltec/heltec_wifi_lora32_v2/board_init.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 213 |
```unknown
choice BOOTLOADER
default BOOTLOADER_MCUBOOT
endchoice
choice BOOT_SIGNATURE_TYPE
default BOOT_SIGNATURE_TYPE_NONE
endchoice
``` | /content/code_sandbox/boards/heltec/heltec_wifi_lora32_v2/Kconfig.sysbuild | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 32 |
```unknown
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_CLOCK_CONTROL=y
``` | /content/code_sandbox/boards/heltec/heltec_wifi_lora32_v2/heltec_wifi_lora32_v2_appcpu_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 15 |
```unknown
# HELTEC ESP32 board configuration
config BOARD_HELTEC_WIFI_LORA32_V2
select SOC_ESP32_D0WD_V3
select SOC_ESP32_PROCPU if BOARD_HELTEC_WIFI_LORA32_V2_ESP32_PROCPU
select SOC_ESP32_APPCPU if BOARD_HELTEC_WIFI_LORA32_V2_ESP32_APPCPU
``` | /content/code_sandbox/boards/heltec/heltec_wifi_lora32_v2/Kconfig.heltec_wifi_lora32_v2 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 81 |
```yaml
identifier: heltec_wifi_lora32_v2/esp32/appcpu
name: HELTEC WiFi LoRa 32 (V2) Board APPCPU
type: mcu
arch: xtensa
toolchain:
- zephyr
supported:
- uart
testing:
ignore_tags:
- net
- bluetooth
- flash
- cpp
- posix
- watchdog
- logging
- kernel
- pm
- gpio
- crypto
- eeprom
- heap
- cmsis_rtos
- jwt
- zdsp
vendor: espressif
``` | /content/code_sandbox/boards/heltec/heltec_wifi_lora32_v2/heltec_wifi_lora32_v2_appcpu.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 141 |
```yaml
board:
name: heltec_wifi_lora32_v2
vendor: heltec
socs:
- name: esp32
``` | /content/code_sandbox/boards/heltec/heltec_wifi_lora32_v2/board.yml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 32 |
```unknown
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
CONFIG_GPIO=y
``` | /content/code_sandbox/boards/heltec/heltec_wifi_lora32_v2/heltec_wifi_lora32_v2_procpu_defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 27 |
```unknown
/*
*
*/
/dts-v1/;
#include <espressif/esp32/esp32_appcpu.dtsi>
/ {
model = "Heltec Wi-Fi Lora32 V2 APPCPU";
compatible = "espressif,esp32";
chosen {
zephyr,sram = &sram0;
zephyr,ipc_shm = &shm0;
zephyr,ipc = &ipm0;
};
};
&ipm0 {
status = "okay";
};
&trng0 {
status = "okay";
};
&flash0 {
status = "okay";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/* Reserve 60kB for the bootloader */
boot_partition: partition@1000 {
label = "mcuboot";
reg = <0x00001000 0x0000F000>;
read-only;
};
/* Reserve 1024kB for the application in slot 0 */
slot0_partition: partition@10000 {
label = "image-0";
reg = <0x00010000 0x00100000>;
};
/* Reserve 1024kB for the application in slot 1 */
slot1_partition: partition@110000 {
label = "image-1";
reg = <0x00110000 0x00100000>;
};
/* Reserve 256kB for the scratch partition */
scratch_partition: partition@210000 {
label = "image-scratch";
reg = <0x00210000 0x00040000>;
};
storage_partition: partition@250000 {
label = "storage";
reg = <0x00250000 0x00006000>;
};
};
};
``` | /content/code_sandbox/boards/heltec/heltec_wifi_lora32_v2/heltec_wifi_lora32_v2_appcpu.dts | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 407 |
```restructuredtext
.. heltec_wireless_stick_lite_v3:
HelTec Wireless Stick Lite (V3)
###############################
Overview
********
HelTec Wireless Stick Lite (V3) is a development board with Wi-Fi, Bluetooth and LoRa support. It is designed and produced by HelTec Automation(TM). [1]_
.. figure:: heltec_wireless_stick_lite_v3.webp
:width: 400px
:align: center
:alt: HelTec Wireless Stick Lite (V3)
HelTec Wireless Stick Lite (V3) (Credit: Chengdu HelTec Automation Technology Co., Ltd.)
Hardware
********
The main hardware features are:
- ESP32-S3FN8 low-power MCU-based SoC (dual-core Xtensa 32-bit LX7 microprocessor, five stage pipeline rack Structure, main frequency up to 240 MHz).
- Semtech SX1262 LoRa node chip
- Type-C USB interface with a complete voltage regulator, ESD protection, short circuit protection, RF shielding, and other protection measures (note: you need an USB-A to USB-C cable if you want to power-up the board from USB).
- Onboard SH1.25-2 battery interface, integrated lithium battery management system (charge and discharge management, overcharge protection, battery power detection, USB / battery power automatic switching).
- Integrated WiFi and Bluetooth interfaces with 2.4GHz metal spring antenna and reserved IPEX (U.FL) interface for LoRa use.
- Integrated CP2102 USB to serial port chip, convenient for program downloading, debugging information printing.
- Good RF circuit design and low-power design.
Supported Features
==================
- LoRa via SPI
- UART0 (USB Serial via CP2102)
- UART1
- I2C
- CAN (optional, need to enable)
- PWM LED
- User Switch / Button
Connections and IOs
===================
.. figure:: heltec_wireless_stick_lite_v3_pinout.webp
:width: 600px
:align: center
:alt: HelTec Wireless Stick Lite (V3) Pinout
Pinout (Credit: Chengdu HelTec Automation Technology Co., Ltd.)
.. table:: HelTec Wireless Stick Lite (V3) Pinout
:widths: auto
+--------+---------+-----------------------------+
| Header | Function| Description |
+========+=========+=============================+
| J2.1 | Ve | |
+--------+---------+-----------------------------+
| J2.2 | GND | |
+--------+---------+-----------------------------+
| J2.3 | | |
+--------+---------+-----------------------------+
| J2.4 | U0RXD | Zephyr Console+Shell |
+--------+---------+-----------------------------+
| J2.5 | U0TXD | Zephyr Console+Shell |
+--------+---------+-----------------------------+
| J2.6 | | |
+--------+---------+-----------------------------+
| J2.7 | | |
+--------+---------+-----------------------------+
| J2.8 | GPIO35 | PWM LED Control |
+--------+---------+-----------------------------+
| J2.9 | GPIO36 | Vext Control |
+--------+---------+-----------------------------+
| J2.10 | GPIO37 | ADC Control |
+--------+---------+-----------------------------+
| J2.11 | | |
+--------+---------+-----------------------------+
| J2.12 | GPIO39 | |
+--------+---------+-----------------------------+
| J2.13 | GPIO40 | |
+--------+---------+-----------------------------+
| J2.14 | GPIO41 | |
+--------+---------+-----------------------------+
| J2.15 | GPIO42 | |
+--------+---------+-----------------------------+
| J2.16 | GPIO45 | |
+--------+---------+-----------------------------+
| J2.17 | GPIO46 | |
+--------+---------+-----------------------------+
| J2.18 | ADC1_CH0| Battery Voltage Measurement |
+--------+---------+-----------------------------+
| J2.19 | | |
+--------+---------+-----------------------------+
| J2.20 | | |
+--------+---------+-----------------------------+
| J3.1 | 5V | |
+--------+---------+-----------------------------+
| J3.2 | 3V3 | |
+--------+---------+-----------------------------+
| J3.3 | GND | |
+--------+---------+-----------------------------+
| J3.4 | GPIO47 | |
+--------+---------+-----------------------------+
| J3.5 | GPIO48 | |
+--------+---------+-----------------------------+
| J3.6 | GPIO0 | User Switch |
+--------+---------+-----------------------------+
| J3.7 | | |
+--------+---------+-----------------------------+
| J3.8 | | |
+--------+---------+-----------------------------+
| J3.9 | U1RXD | UART 1 |
+--------+---------+-----------------------------+
| J3.10 | GPIO21 | |
+--------+---------+-----------------------------+
| J3.11 | | |
+--------+---------+-----------------------------+
| J3.12 | U1TXD | UART 1 |
+--------+---------+-----------------------------+
| J3.13 | | |
+--------+---------+-----------------------------+
| J3.14 | NC | Reset Switch |
+--------+---------+-----------------------------+
| J3.15 | | |
+--------+---------+-----------------------------+
| J3.16 | | |
+--------+---------+-----------------------------+
| J3.17 | | |
+--------+---------+-----------------------------+
| J3.18 | | |
+--------+---------+-----------------------------+
| J3.19 | TWAI_TX | CAN (optional) |
+--------+---------+-----------------------------+
| J3.20 | TWAI_RX | CAN (optional) |
+--------+---------+-----------------------------+
System requirements
*******************
Prerequisites
=============
Espressif HAL requires WiFi and Bluetooth binary blobs in order work. Run the command
below to retrieve those files.
.. code-block:: console
west blobs fetch hal_espressif
.. note::
It is recommended running the command above after :file:`west update`.
Programming and Debugging
*************************
Simple boot
===========
The board could be loaded using the single binary image, without 2nd stage bootloader.
It is the default option when building the application without additional configuration.
.. note::
Simple boot does not provide any security features nor OTA updates.
MCUboot bootloader
==================
User may choose to use MCUboot bootloader instead. In that case the bootloader
must be build (and flash) at least once.
There are two options to be used when building an application:
1. Sysbuild
2. Manual build
.. note::
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========
The sysbuild makes possible to build and flash all necessary images needed to
bootstrap the board with the EPS32-S3 SoC.
To build the sample application using sysbuild use the command:
.. zephyr-app-commands::
:tool: west
:app: samples/hello_world
:board: heltec_wireless_stick_lite_v3
:goals: build
:west-args: --sysbuild
:compact:
By default, the ESP32S3 sysbuild creates bootloader (MCUboot) and application
images. But it can be configured to create other kind of images.
Build directory structure created by sysbuild is different from traditional
Zephyr build. Output is structured by the domain subdirectories:
.. code-block::
build/
hello_world
zephyr
zephyr.elf
zephyr.bin
mcuboot
zephyr
zephyr.elf
zephyr.bin
domains.yaml
.. note::
With ``--sysbuild`` option the bootloader will be re-build and re-flash
every time the pristine build is used.
For more information about the system build please read the :ref:`sysbuild` documentation.
Manual build
============
During the development cycle, it is intended to build & flash as quickly possible.
For that reason, images can be build one at a time using traditional build.
The instructions following are relevant for both manual build and sysbuild.
The only difference is the structure of the build directory.
.. note::
Remember that bootloader (MCUboot) needs to be flash at least once.
Build and flash applications as usual (see :ref:`build_an_application` and
:ref:`application_run` for more details).
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: heltec_wireless_stick_lite_v3/esp32s3/procpu
:goals: build
The usual ``flash`` target will work with the ``heltec_wireless_stick_lite_v3`` board
configuration. Here is an example for the :ref:`hello_world`
application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: heltec_wireless_stick_lite_v3/esp32s3/procpu
:goals: flash
Open the serial monitor using the following command:
.. code-block:: shell
west espressif monitor
After the board has automatically reset and booted, you should see the following
message in the monitor:
.. code-block:: console
***** Booting Zephyr OS vx.x.x-xxx-gxxxxxxxxxxxx *****
Hello World! heltec_wireless_stick_lite_v3
Debugging
=========
As with much custom hardware, the ESP32S3 modules require patches to
OpenOCD that are not upstreamed yet. Espressif maintains their own fork of
the project. The custom OpenOCD can be obtained at `OpenOCD ESP32`_
The Zephyr SDK uses a bundled version of OpenOCD by default. You can overwrite that behavior by adding the
``-DOPENOCD=<path/to/bin/openocd> -DOPENOCD_DEFAULT_PATH=<path/to/openocd/share/openocd/scripts>``
parameter when building.
Here is an example for building the :ref:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: heltec_wireless_stick_lite_v3/esp32s3/procpu
:goals: build flash
:gen-args: -DOPENOCD=<path/to/bin/openocd> -DOPENOCD_DEFAULT_PATH=<path/to/openocd/share/openocd/scripts>
You can debug an application in the usual way. Here is an example for the :ref:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: heltec_wireless_stick_lite_v3/esp32s3/procpu
:goals: debug
References
**********
- `Heltec Wireless Stick Lite (v3) Pinout Diagram <path_to_url`_
- `Heltec Wireless Stick Lite (v3) Schematic Diagrams <path_to_url`_
- `ESP-IDF Programming Guide <path_to_url`_
- `esptool documentation <path_to_url`_
- `OpenOCD ESP32 <path_to_url`_
.. [1] path_to_url
``` | /content/code_sandbox/boards/heltec/heltec_wireless_stick_lite_v3/doc/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,659 |
```unknown
# HELTEC board configuration
if BOARD_HELTEC_WIFI_LORA32_V2_ESP32_PROCPU
config HEAP_MEM_POOL_ADD_SIZE_BOARD
int
default 65535 if WIFI && BT
default 51200 if WIFI
default 40960 if BT
default 4096
endif # BOARD_HELTEC_WIFI_LORA32_V2_ESP32_PROCPU
if BOARD_HELTEC_WIFI_LORA32_V2_ESP32_APPCPU
config HEAP_MEM_POOL_ADD_SIZE_BOARD
default 256
endif # BOARD_HELTEC_WIFI_LORA_V2_ESP32_APPCPU
``` | /content/code_sandbox/boards/heltec/heltec_wifi_lora32_v2/Kconfig.defconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 127 |
```unknown
/*
*
*/
#include <zephyr/dt-bindings/pinctrl/esp-pinctrl-common.h>
#include <dt-bindings/pinctrl/esp32-pinctrl.h>
#include <zephyr/dt-bindings/pinctrl/esp32-gpio-sigmap.h>
&pinctrl {
uart0_default: uart0_default {
group1 {
pinmux = <UART0_TX_GPIO1>;
output-high;
};
group2 {
pinmux = <UART0_RX_GPIO3>;
bias-pull-up;
};
};
spim3_default: spim3_default {
group1 {
pinmux = <SPIM3_MISO_GPIO19>,
<SPIM3_SCLK_GPIO5>;
};
group2 {
pinmux = <SPIM3_MOSI_GPIO27>;
output-low;
};
};
i2c0_default: i2c0_default {
group1 {
pinmux = <I2C0_SDA_GPIO4>,
<I2C0_SCL_GPIO15>;
bias-pull-up;
drive-open-drain;
output-high;
};
};
};
``` | /content/code_sandbox/boards/heltec/heltec_wifi_lora32_v2/heltec_wifi_lora32_v2-pinctrl.dtsi | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 260 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.