boards: arm: Add xmc47_relax_kit

Adds Infineon xmc47_relax_kit board.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
This commit is contained in:
Andriy Gelman 2022-10-07 21:26:43 -04:00 committed by Carles Cufí
parent f2b61595f0
commit f8f09300c1
11 changed files with 315 additions and 1 deletions

View file

@ -0,0 +1,8 @@
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2023 Schlumberger
config BOARD_XMC47_RELAX_KIT
bool "Infineon XMC4700 Relax Kit"
depends on SOC_SERIES_XMC_4XXX
select SOC_PART_NUMBER_F144X2048

View file

@ -0,0 +1,10 @@
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2023 Schlumberger
if BOARD_XMC47_RELAX_KIT
config BOARD
default "xmc47_relax_kit"
endif

View file

@ -0,0 +1,10 @@
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2023 Schlumberger
board_set_debugger_ifnset(jlink)
board_set_flasher_ifnset(jlink)
board_runner_args(jlink "--device=XMC4700-2048")
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

View file

@ -0,0 +1,94 @@
.. _xmc47_relax_kit:
INFINEON XMC47-RELAX-KIT
########################
Overview
********
The XMC4700 Relax Kit is designed to evaluate the capabilities of the XMC4700
Microcontroller. It is based on High performance ARM Cortex-M4F which can run
up to 144MHz.
.. image:: xmc47_relax_kit.jpg
:align: center
:alt: XMC47-RELAX-KIT
Features:
=========
* ARM Cortex-M4F XMC4700
* On-board Debug Probe with USB interface supporting SWD + SWO
* Virtual COM Port via Debug Probe
* USB (Micro USB Plug)
* 32 Mbit Quad-SPI Flash
* Ethernet PHY and RJ45 Jack
* 32.768 kHz RTC Crystal
* microSD Card Slot
* CAN Transceiver
* 2 pin header x1 and x2 with 80 pins
* Two buttons and two LEDs for user interaction
Details on the Relax Kit development board can be found in the `Relax Kit User Manual`_.
Supported Features
==================
The Relax Kit development board configuration supports the following hardware features:
+-----------+------------+-----------------------+
| Interface | Controller | Driver/Component |
+===========+============+=======================+
| NVIC | on-chip | nested vectored |
| | | interrupt controller |
+-----------+------------+-----------------------+
| SYSTICK | on-chip | system clock |
+-----------+------------+-----------------------+
| UART | on-chip | serial port |
+-----------+------------+-----------------------+
| SPI | on-chip | spi |
+-----------+------------+-----------------------+
| GPIO | on-chip | gpio |
+-----------+------------+-----------------------+
| FLASH | on-chip | flash |
+-----------+------------+-----------------------+
| ADC | on-chip | adc |
+-----------+------------+-----------------------+
| DMA | on-chip | dma |
+-----------+------------+-----------------------+
More details about the supported peripherals are available in `XMC4700 TRM`_
Other hardware features are not currently supported by the Zephyr kernel.
Building and Flashing
*********************
Flashing
========
Here is an example for the :ref:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: xmc47_relax_kit
:goals: flash
Debugging
=========
Here is an example for the :ref:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: xmc47_relax_kit
:goals: debug
Step through the application in your debugger.
References
**********
.. _Relax Kit User Manual:
https://www.infineon.com/dgdl/Infineon-Board_User_Manual_XMC4700_XMC4800_Relax_Kit_Series-UserManual-v01_04-EN.pdf?fileId=5546d46250cc1fdf01513f8e052d07fc
.. _XMC4700 TRM:
https://www.infineon.com/dgdl/Infineon-ReferenceManual_XMC4700_XMC4800-UM-v01_03-EN.pdf?fileId=5546d462518ffd850151904eb90c0044

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View file

@ -0,0 +1,17 @@
/*
* Copyright (c) 2023 Schlumberger
* SPDX-License-Identifier: Apache-2.0
*/
#include <infineon/xmc4700_F144x2048-pinctrl.dtsi>
&uart_tx_p1_5_u0c0 {
drive-strength = "strong-soft-edge";
drive-push-pull;
hwctrl = "disabled";
};
&uart_rx_p1_4_u0c0 {
drive-strength = "strong-soft-edge";
hwctrl = "disabled";
};

View file

@ -0,0 +1,109 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2023 Schlumberger
*
*/
/dts-v1/;
#include <infineon/xmc4700_F144x2048.dtsi>
#include <infineon/xmc4700_F144x2048-intc.dtsi>
#include "xmc47_relax_kit-pinctrl.dtsi"
/ {
model = "Infineon XMC4700 Relax Kit board";
compatible = "infineon,xmc4700", "infineon,xmc4xxx";
aliases {
led0 = &led1;
die-temp0 = &die_temp;
};
leds {
compatible = "gpio-leds";
/* leds are labelled LED1 and LED2 in the relax kit documentation */
led1: led1 {
gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>;
};
led2: led2 {
gpios = <&gpio5 8 GPIO_ACTIVE_HIGH>;
};
};
chosen {
zephyr,sram = &psram1;
zephyr,flash = &flash0;
zephyr,console = &usic0ch0;
zephyr,shell-uart = &usic0ch0;
zephyr,flash-controller = &flash_controller;
zephyr,code-partition = &code_partition;
};
};
&dsram1 {
compatible = "zephyr,memory-region", "mmio-sram";
zephyr,memory-region = "DSRAM1";
};
&dsram2 {
compatible = "zephyr,memory-region", "mmio-sram";
zephyr,memory-region = "DSRAM2";
};
&cpu0 {
clock-frequency = <144000000>;
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
code_partition: partition@0 {
reg = <0x0 0x80000>;
read-only;
};
storage_partition: partition@80000 {
label = "storage";
reg = <0x80000 0x80000>;
};
};
};
&usic0ch0 {
compatible = "infineon,xmc4xxx-uart";
current-speed = <115200>;
pinctrl-0 = <&uart_tx_p1_5_u0c0 &uart_rx_p1_4_u0c0>;
pinctrl-names = "default";
input-src = "DX0B";
interrupts = <84 1 85 1>;
interrupt-names = "tx", "rx";
fifo-start-offset = <0>;
fifo-tx-size = <16>;
fifo-rx-size = <16>;
status = "okay";
};
&adc0 {
vref-internal-mv = <3300>;
};
&adc1 {
vref-internal-mv = <3300>;
};
&adc2 {
vref-internal-mv = <3300>;
};
&adc3 {
vref-internal-mv = <3300>;
};
&gpio5 {
status = "okay";
};

View file

@ -0,0 +1,15 @@
identifier: xmc47_relax_kit
name: XMC47-RELAX-KIT
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
supported:
- adc
- dma
- gpio
- spi
- uart
ram: 352
flash: 2048

View file

@ -0,0 +1,15 @@
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2023 Schlumberger
CONFIG_BOARD_XMC47_RELAX_KIT=y
CONFIG_SOC_SERIES_XMC_4XXX=y
CONFIG_SOC_XMC4700=y
# enable uart driver
CONFIG_SERIAL=y
# enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_USE_DT_CODE_PARTITION=y

View file

@ -0,0 +1,36 @@
/*
* Copyright 2023 Schlumberger
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/dt-bindings/adc/adc.h>
/ {
zephyr,user {
/* adjust channel number according to pinmux in board.dts */
io-channels = <&adc0 0>, <&adc0 1>;
};
};
&adc0 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
channel@0 {
reg = <0>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,resolution = <12>;
};
channel@1 {
reg = <1>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,resolution = <12>;
};
};

View file

@ -27,7 +27,7 @@ tests:
extra_configs:
- CONFIG_USE_SEGGER_RTT=y
- CONFIG_UART_RTT=y
platform_exclude: xmc45_relax_kit
platform_exclude: xmc45_relax_kit xmc47_relax_kit
build_only: true
drivers.uart.async_api.lpuart:
filter: CONFIG_UART_CONSOLE and CONFIG_SERIAL_SUPPORT_ASYNC and CONFIG_UART_MCUX_LPUART