boards: add initial support for adi_sdp_k1

Add board configuration, dts and pinmux based on the stm32f469i_disco
board.

Signed-off-by: Philip Molloy <philip@philipmolloy.com>
This commit is contained in:
Philip Molloy 2023-12-29 11:17:09 +01:00 committed by Fabio Baltieri
parent a369eb7b36
commit ee36d9659f
13 changed files with 391 additions and 0 deletions

View file

@ -0,0 +1,8 @@
# ADI SDP-K1 board configuration
# Copyright (c) 2024 BayLibre
# SPDX-License-Identifier: Apache-2.0
config BOARD_ADI_SDP_K1
bool "ADI SDP-K1 Controller Board"
depends on SOC_STM32F469XX

View file

@ -0,0 +1,15 @@
# ADI SDP-K1 board configuration
# Copyright (c) 2024 BayLibre
# SPDX-License-Identifier: Apache-2.0
if BOARD_ADI_SDP_K1
config BOARD
default "adi_sdp_k1"
config SPI_STM32_INTERRUPT
default y
depends on SPI
endif # BOARD_ADI_SDP_K1

View file

@ -0,0 +1,80 @@
/*
* Copyright (c) 2024 BayLibre
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <st/f4/stm32f469Xi.dtsi>
#include <st/f4/stm32f469nihx-pinctrl.dtsi>
#include "arduino_r3_connector.dtsi"
/ {
model = "Analog Devices Inc. SDP-K1 board";
compatible = "adi,sdp-k1";
chosen {
zephyr,console = &uart5;
zephyr,shell-uart = &uart5;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,ccm = &ccm0;
};
leds {
compatible = "gpio-leds";
status_led: led_ds3 {
gpios = <&gpiok 4 GPIO_ACTIVE_HIGH>;
label = "Status DS3";
};
green_led_1: led_ds4 {
gpios = <&gpiok 5 GPIO_ACTIVE_HIGH>;
label = "User LD1";
};
orange_led_2: led_ds5 {
gpios = <&gpiok 6 GPIO_ACTIVE_HIGH>;
label = "User LD2";
};
red_led_3: led_ds6 {
gpios = <&gpiok 7 GPIO_ACTIVE_HIGH>;
label = "User LD3";
};
};
aliases {
led0 = &status_led;
};
};
&clk_lsi {
status = "okay";
};
&clk_hse {
clock-frequency = <DT_FREQ_M(8)>;
status = "okay";
};
&pll {
div-m = <8>;
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>;
};
&uart5 {
pinctrl-0 = <&uart5_tx_pc12 &uart5_rx_pd2>;
pinctrl-names = "default";
current-speed = <115200>;
status = "okay";
};

View file

@ -0,0 +1,13 @@
identifier: adi_sdp_k1
name: ADI SDP-K1
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
ram: 384
flash: 2048
supported:
- gpio
vendor: adi

View file

@ -0,0 +1,25 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F469XX=y
# 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

View file

@ -0,0 +1,40 @@
/*
* Copyright (c) 2024 BayLibre
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
arduino_header: connector {
compatible = "arduino-header-r3";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map = <0 0 &gpioa 2 0>, /* A0 */
<1 0 &gpioa 4 0>, /* A1 */
<2 0 &gpioa 6 0>, /* A2 */
<3 0 &gpioc 1 0>, /* A3 */
<4 0 &gpioc 4 0>, /* A4 */
<5 0 &gpioc 5 0>, /* A5 */
<6 0 &gpioa 1 0>, /* D0 */
<7 0 &gpioa 0 0>, /* D1 */
<8 0 &gpiog 7 0>, /* D2 */
<9 0 &gpiod 12 0>, /* D3 */
<10 0 &gpiog 9 0>, /* D4 */
<11 0 &gpioa 11 0>, /* D5 */
<12 0 &gpioa 10 0>, /* D6 */
<13 0 &gpiog 10 0>, /* D7 */
<14 0 &gpiog 11 0>, /* D8 */
<15 0 &gpiob 15 0>, /* D9 */
<16 0 &gpioa 15 0>, /* D10 */
<17 0 &gpioa 7 0>, /* D11 */
<18 0 &gpiob 4 0>, /* D12 */
<19 0 &gpiob 3 0>, /* D13 */
<20 0 &gpiob 7 0>, /* D14 */
<21 0 &gpiob 8 0>; /* D15 */
};
};
arduino_i2c: &i2c1 {};
arduino_spi: &spi1 {};
arduino_serial: &usart2 {};

View file

@ -0,0 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
board_runner_args(jlink "--device=STM32F469NI" "--speed=4000")
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

View file

@ -0,0 +1,184 @@
.. _adi_sdp_k1:
ADI SDP-K1
##########
Overview
********
The EVAL-SDP-CK1Z (SDP-K1) controller board is a system demonstration platform
(SDP) from Analog Devices designed to connect to evaluation shields containing
ADI components.
- STM32 microcontroller in BGA216 package
- USB 2.0 device with USB-C connector
- USB debug interface supporting CMSIS-DAP through a NXP Freescale
microcontroller
- Flexible board power supply
- USB VBUS 5 V max. 500 mA
- 5.5mm DC power jack 7 - 12 V min. 300 mA
- VIN from Arduino* compatible connectors
- VIN from 120-pin connector 5 V min. 300 mA
- 3 color LEDs (green, orange, red) and 1 status LED
- One push-buttons: RESET
- 16MB SDRAM
- Arduino UNO and 120-pin SDP connectors
.. figure:: img/adi_sdp_k1.webp
:align: center
:alt: ADI SDP-K1
ADI SDP-K1 (Credit: Analog Devices, Inc.)
More information about the board can be found on the `ADI SDP-K1 website`_.
Hardware
********
ADI SDP-K1 provides the following hardware components:
- STM32F469NIH6 in BGA216 package
- ARM |reg| 32-bit Cortex |reg| -M4 CPU with FPU
- 180 MHz max CPU frequency
- VDD of 1.8 V or 3.3 V
- 2 MB Flash
- 384 KB SRAM
- GPIO with external interrupt capability
- LCD parallel interface, 8080/6800 modes
- LCD TFT controller supporting up to XGA resolution
- MIPI |reg| DSI host controller supporting up to 720p 30Hz resolution
- 3x12-bit ADC with 24 channels
- 2x12-bit D/A converters
- RTC
- Advanced-control Timer
- General Purpose Timers (17)
- Watchdog Timers (2)
- USART/UART (8)
- I2C (3)
- SPI (6)
- 1xSAI (serial audio interface)
- SDIO
- 2xCAN
- USB 2.0 OTG FS with on-chip PHY
- USB 2.0 OTG HS/FS with dedicated DMA, on-chip full-speed PHY and ULPI
- 10/100 Ethernet MAC with dedicated DMA
- 8- to 14-bit parallel camera
- CRC calculation unit
- True random number generator
- DMA Controller
More information about STM32F469NI can be found here:
- `STM32F469NI product page`_
- `STM32F469 reference manual`_
Supported Features
==================
The Zephyr stm32f469i_disco board configuration supports the following hardware features:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+=====================================+
| UART | on-chip | serial port-polling; |
| | | serial port-interrupt |
+-----------+------------+-------------------------------------+
| PINMUX | on-chip | pinmux |
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
+-----------+------------+-------------------------------------+
Other hardware features are not yet supported on Zephyr porting.
The default configuration can be found in the defconfig file:
``boards/arm/adi_sdp_k1/adi_sdp_k1_defconfig``
Pin Mapping
===========
For more details please refer to `EVAL-SDP-CK1Z User Guide`_.
Arduino UNO headers
-------------------
.. figure:: img/adi_sdp_k1_arduino.webp
:align: center
:alt: ADI SDP-K1 Arduino UNO headers pinout
ADI SDP-K1 (Credit: Analog Devices, Inc.)
120-pin SDP connector
---------------------
.. figure:: img/adi_sdp_k1_120pin.webp
:align: center
:alt: ADI SDP-K1 120-pin SDP connector pinout
ADI SDP-K1 (Credit: Analog Devices, Inc.)
Default Zephyr Peripheral Mapping:
----------------------------------
- UART_5 TX/RX : P2 (DAPLink USB-C)
- UART_5 TX/RX : P8 (DAPLink two position through hole)
- LED1 : DS6 (Red)
- LED2 : DS5 (Orange)
- LED3 : DS4 (Green)
- LED4 : DS4 (Status)
Programming and Debugging
*************************
The ADI SDP-K1 be programmed over USB using the DAPLink firmware running on an
embedded NXP Freescale microcontroller or a 10-pin ``DEBUG`` header connected
to a STLINK debugger.
DAPLink exposes a storage device, as well as USB HID and CDC Endpoints, to the
host. For more details please refer to the `Official DAPLink website`_.
Flashing
========
Flashing an application with a STLINK debugger
----------------------------------------------
First, connect the STLINK debugger to your host computer using the Micro-USB port.
Then attach the debugger to the 10-pin ``DEBUG`` header on the SDP-K1. Finally
connect the SDP-K1 to your host computer using the USB-C port.
Run a serial host program to connect with your board:
.. code-block:: console
$ minicom -D /dev/serial/by-id/usb-ARM_DAPLink_CMSIS-DAP_<...>
Here is an example for the :ref:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: adi_sdp_k1
:goals: build flash
You should see the following message on the console:
.. code-block:: console
Hello World! adi_sdp_k1
Debugging
=========
.. _ADI SDP-K1 website:
https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/sdp-k1.html
.. _EVAL-SDP-CK1Z User Guide:
https://www.analog.com/media/en/technical-documentation/user-guides/EVAL-SDP-CK1Z-UG-1539.pdf
.. _STM32F469NI product page:
https://www.st.com/en/microcontrollers/stm32f469ni.html
.. _STM32F469 reference manual:
https://www.st.com/resource/en/reference_manual/dm00127514.pdf
.. _Official DAPLink website:
https://daplink.io/

View file

@ -0,0 +1,8 @@
# Copyright (c) 2024 BayLibre
# SPDX-License-Identifier: Apache-2.0
board_check_revision(
FORMAT LETTER
DEFAULT_REVISION E
VALID_REVISIONS B E
)

View file

@ -0,0 +1,12 @@
source [find board/st_nucleo_f4.cfg]
$_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
}